Oh yeh, I can't seem to get my weapon swap system to work.....
Basically, what it's meant to do is when the player is near it, it shows a HUD. If the player presses enter, it checks wht weapon the player has, replaces that weapon with itself, calls up a variable that will be checked by the relavent weapon entity, which appears near the player as though they dropped it, then the orignal entity disappears.....
Sadly, it shows the HUD, but absolutely nothing else happens when I press enter. No weapon replacement, no dissappearing, no entity movement, nothing....
The weaponswap variable is definitely in my setuplevel.fpi file, so I dunno what's up here.....
Here's an example script:
;CoffeeGrunt Scripts
;Header
desc = test hotswap
;Triggers
;LOADS THE GUN'S HUD
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=HUD,hudhide=1,hudmake=display,state=1
;IF THE GUN'S VARIBLE IS CALLED IT WILL MOVE TO THE PLAYER'S POSITION
:state=1,varequal=weaponswap 2:setvar=$EPX $CPX,setvar=$EPY $CPY,setvar=$EPZ $CPZ,rotatetoplr,movefore=-40,moveup=20,setvar=weaponswap 0
;HUD STUFF
:state=1,plrdistfurther=100:hudunshow=HUD
:state=1,plrdistwithin=70:hudshow=HUD
;MAIN SWAPPING SEQUENCE
:state=1,plrdistwithin=40,plrusingaction=1,haveweap=scifi\tavor:replaceweap=scifi\tavor scifi\blaster,setvar=weaponswap 1,setalphafade=0
:state=1,plrdistwithin=40,plrusingaction=1,haveweap=scifi\vickers:replaceweap=scifi\vickers scifi\blaster,setvar=weaponswap 3,setalphafade=0
:state=1,plrdistwithin=40,plrusingaction=1,haveweap=GPS\P90:replaceweap=GPS\P90 scifi\blaster,setvar=weaponswap 4,setalphafade=0
:state=1,plrdistwithin=40,plrusingaction=1,haveweap=Model Pack 6\MP5K:replaceweap=Model Pack 6\MP5K scifi\blaster,setvar=weaponswap 5,setalphafade=0
;End Script