I've been trying all night to get this thing to work. Essentially I'm trying to modify the "player body" script that comes with project blue so that the character I made will play an animation I've given it (tagged on at the end of the animation set). The animation works because throughout the evening on some occasions I've managed to get it to play in FPSC.
Basically, what I'm hoping the script will do is that when the player presses 'F' (ie key 33) the player freezes (got that working on occasion), the field of view of the camera shifts slightly so that the animation of the arm lifing can be seen (got that working too), play the animation while the view is shifted and then play a decal in front of the player where the hand is. That bit can come later, but for now, I just want the animation to play once, once the player taps F.
Now I can make it happen when the player holds it down, but then it just repeats and doesn't really work. I'm rubbish at scripting, but here's what I've got so far (that doesn't work).
;set up entity as player body
:state=0:bindentitytocam=0,offsetentmovebeforerotate=1,offsetenty=-23,offsetentfore=-15,animate=1,dimvar=Calc,dimvar=Moving,dimvar=Anim
:state=0:scancodekeypressed=33:timerstart,plrfreeze=4600,camfov=30,animate=92,state=1
:state=1:timergreater=4600:state=0
;animations
:ALWAYS:setvar=Moving 0
:keypressed=17 1,plrusingrun=0:addvar=Moving 1
:keypressed=17 1,plrusingrun=1:addvar=Moving 2
:keypressed=31 1,plrusingrun=0:addvar=Moving -1
:keypressed=31 1,plrusingrun=1:addvar=Moving -2
:ALWAYS:setvar=Calc 0
:keypressed=30 1:addvar=Calc -90
:keypressed=32 1:addvar=Calc 90
:vargreater=Moving 1:divvar=Calc 2
:varless=Moving -1:divvar=Calc -2
:ALWAYS:addvar=Calc 180
:varnotequal=Calc 90,varnotequal=Calc -90: offsetentyang=%Calc
:varequal=Moving 2:setanimspeed=100,setvar=Anim 5
:varequal=Moving 1:setanimspeed=100,setvar=Anim 2
:varequal=Moving 0:setanimspeed=100,setvar=Anim 1
:varequal=Moving 0,varnotequal=Calc 180,plrusingrun=0:setanimspeed=100,setvar=Anim 3
:varequal=Moving 0,varnotequal=Calc 180,plrusingrun=1:setanimspeed=100,setvar=Anim 3
:varequal=Moving -1:setanimspeed=-100,setvar=Anim 2
:varequal=Moving -2:setanimspeed=-100,setvar=Anim 5
;Crouching
:keypressed=46 1:addvar=Anim 30,offsetenty=7
:keypressed=46 0:offsetenty=-23
:ALWAYS:animate=%Anim
[center]