Third Person Weapon

Topics regarding Scripting with Reality Factory
Post Reply
LHoesch

Third Person Weapon

Post by LHoesch »

hi,
i have a problem.i want to make a 3rd Person Weapon.
In 1st Person,it is already good, but it wont be attach to the player.
when i jump,the weaponis at the one position.its the same with shooting,idling,walking,running.
Hera are the Definitions.(They are from RF072 (not 072A))

;
; 9mm AR pistol
;
; This will only appear as a first person view weapon
;

[9mmAR]
type = weapon
slot = 2
firerate = 0.25
catagory = projectile
projectile = pistolbullet
attribute = health
ammunition = pistolbullet
ammopershot = 1
shotpermagazine = 10
loosemag = true
worksunderwater = true
attacksound = weapon\bulletfire.wav
reloadsound = weapon\reload3.wav
emptysound = weapon\click.wav
muzzleflash = PMuzzleFlash

;
; 1st person
;
viewactor = weapon\v9mmar.act
viewfillcolor = 128 128 128
viewambientcolor = 128 128 128
viewrotation = -8 97.8 30.4
viewoffset = 3.1 -2.3 -2.4
viewscale = 0.3
viewlaunchoffset = 0 0 0
viewanimspeed = 1
viewarmanim = Arm
viewidleanim = Idle
viewattackanim = Shoot
viewwalkanim = Walk
viewreloadanim = Reload
viewkeyreloadanim = Reload
viewattackemptyanim = Shoot
viewlaunchbone = bang
crosshair = crosshairs\pistol.bmp
crosshairalpha = crosshairs\a_pistol.bmp
crosshairfixed = false
recoilamount = 5
recoildecay = 10
;
; 3rd person
;
playeractor = weapon\p9mmar.act
playerfillcolor = 128 128 128
playerambientcolor = 128 128 128
playerrotation = 0 180 0
playerscale = 1
playerlaunchoffset = 0 0 10
playerbone = Line02

Is the playerbone entry the bone from the weapon or from the player???
Thanks Lukas
User avatar
AndyCR
Posts: 1449
Joined: Wed Jul 06, 2005 5:08 pm
Location: Colorado, USA
Contact:

Re: Third Person Weapon

Post by AndyCR »

LHoesch wrote:Is the playerbone entry the bone from the weapon or from the player???
i believe both, since the skeletons for both have to be identical. if not, thats the problem.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

Does anyone care to read the docs?
playeractor - name of actor file used as the 3rd person weapon
playerbone - name of bone in playeractor to launch projectile from (Projectile weapon only)
LHoesch

Post by LHoesch »

Has anybody this problem,too???
berthus
Posts: 10
Joined: Thu Feb 23, 2006 2:12 pm

Post by berthus »

Yes, I've got the same problem...

The bones are the same, and when I shot, the gun shot with his animmation...

The problem is that when the character jumps... then the weapon also jump... but less than the character :(

There is any documentation or example about how to work with third weapon?
LukasH
Posts: 10
Joined: Sat Dec 03, 2005 9:32 am

Post by LukasH »

In the demo RF 063 (I think) ernie has got 3rd Person Weapons.
With ernie.act it goes...
BUT...

I think the problem is that the bones must have the same names, so took the skeleton from your character and move your weapon on the bone and assign it. Then compile and try.
Lukas Hoesch
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

OK.
1 the weapon and the player must have the same skeleton.
2 the weapon does not need own animations because they are taken from the player
3 the weapons COULD work with other skeletons as long as the bone names were right but this can lead to strange animations like the weapon not 'jumping' as high as the player.

-> so after all the only trick is to have the same skeleton as the player and to use the animation names of the player (which you are able to see with ActView or Viewer)
Everyone can see the difficult, but only the wise can see the simple.
-----
GD1
Posts: 413
Joined: Tue Jul 05, 2005 2:33 pm

Post by GD1 »

remember too that the name of the animation is the name of the original .mot file. the name you give it in actorstudio does not matter, but it's good practice for it to be identical to the name of the .mot file. but the animation will only play if you use the original .mot filename in the .ini files.
Check out my band
Tougher Than Fort Knox
Image
Post Reply