Hello Folks,
I am trying to create a mortar gun model.
It`s working well, but with some problems.
The model itself is a character entity with a rockect launcher gun as a weapon. However, this gun is a copy of the ww2 bazooka but with a transparent texture, this ways it will not be shown in top of the mortar (where is located the FIRESPOT)
I also made a hand animation that carries the mortar round and put it inside the mortar canon.
When the player comes close to it, the camera will adjust using the new command "entitycam", "camoffsetx",...
I want that when the player presses the "G" key, it will play the animation, then after finishes the animation, it will shoot.
But i`m trying and it`s not working, it plays the animation, then stays shooting forever and does not stop.
Can anyone help me?
Thanks,
007
Here is the code:
:state=0:state1
;if player presses [0] will "activate" mortar gun
:state=1,plrdistwithin=80:hudshow=activate_mortar,hudfadeout=activate_mortar
:state=1,plrdistwithin=80,scancodekeypressed=11:hudfadeout=activate_mortar,state=2
;here we are using the new camera commands
:state=2:entitycam,setcamoffsetx=-6,setcamoffsety=25,setcamrotx=-10
;if player presses [U] will unmount mortar and return to state 1
:state=2,scancodekeypressed=22:playercam,setcamoffsetx=0,setcamoffsety=0,setcamrotx=0,state=1
;if player presses [F] mortar gun rotates left
:state=2,scancodekeypressed=33:rotatey=-2
;if player presses [H] mortar gun rotates right
:state=2,scancodekeypressed=35:rotatey=2
;this is the command for use weapon [G] and here i am getting the error that after pressing [G] the mortar does not stop to shoot
:state=2,ifweapon=1,scancodekeypressed=34:setframe=100,incframe=100
:state=2,frameatend=100:useweapon,rundecal=6
:state=2,ifweapon=0:state=4
:state=4:state=2,reloadweapon
Goldenye 007 N64