Page 1 of 1

Third Person Weapon

Posted: Mon Nov 21, 2005 4:26 pm
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

Re: Third Person Weapon

Posted: Mon Nov 21, 2005 9:11 pm
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.

Posted: Mon Nov 21, 2005 10:10 pm
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)

Posted: Tue Nov 22, 2005 2:25 pm
by LHoesch
Has anybody this problem,too???

Posted: Wed Mar 01, 2006 11:28 pm
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?

Posted: Sun Mar 05, 2006 5:08 pm
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.

Posted: Tue Mar 07, 2006 8:10 pm
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)

Posted: Wed Mar 08, 2006 6:34 pm
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.