Greetings,
I am currently working on a points-based system for purchasing weapons and what-not. The intention is that a player could purchase a weapon, and it would swap with the weapon the player is holding at the time (the player can only hold one weapon).
The script works fine for the most part, but the newly purchased weapon doesn't appear on-screen until the '1' key is pressed (Which tells me the weapon is definitely there). Is there any way to cause an 'automatic' appearance of the weapon?
Here's the script I'm working with:
;Artificial Intelligence Script By Conjured Entertainment
;Modified for purpose by Aperture GFX
;Header
desc = Pickup G36 for 1200 Points
;Triggers
:plrwithinzone=0,activated=9:activate=0,hudunshow=G36,state=2
:state=0:hudreset,hudx=50,hudy=80,hudimagefine=gamecore\huds\user\Survival\G36HUD.png,hudname=G36,hudhide=1,hudmake=display,state=2
:state=1:rundecal=5
:state=2,plrdistwithin=40:activate=9,state=3
:state=3,varequal=cecashcounter 1000:state=5
:state=3,varless=cecashcounter 1000:state=5
:state=3,vargreater=cecashcounter 1000:state=5
:state=5:hudshow=G36,state=6
:state=6,scancodekeypressed=21:hudunshow=G36,state=10
:state=6,plrwithinzone=0,activated=9:activate=0,hudunshow=G36,state=2
:state=7,plrwithinzone=0,activated=9:activate=0,state=2
:state=10:subvar=cecashcounter 1000,removecurrentweapon,playertake,coloff,state=1
;End