Hey all
For the game I'm working on I wanted to give guns a new script that incorporates gui-x9 into them...problem is, it won't work.
;Artificial Intelligence Script
;Header
desc = gun pickup script(primary), uses gui-x9 and PB
;Triggers
:state=0:usegui=1,loadimage=yes gamecore\huds\yes-no\yes.png,loadimage=no gamecore\huds\yes-no\no.png,loadimage=yesmo gamecore\huds\yes-no\yesmousover.png,loadimage=nomo gamecore\huds\yes-no\nomousover.png,
:state=0:hudreset,hudx=50,hudy=80,hudimagefine=gamecore\hudsguns\g63c.png,hudname=g36cpickup,hudhide=1,hudmake=display,state=2
:state=2,plrdistwithin=50:hudshow=g36cpickup,hudfadeout=g36cpickup
:state=2,scancodekeypressed=18:showcursor,loadimage=weapondetails test.png,makehud=gunstats weapondetails none 50 50,makehud=yeshud yes yesmo 40 80 ,makehud=nohud no nomo 60 80,hudclickable=nohud 1,hudclickable=yeshud 1,pausegame
:state=2,hudmouseup=nohud 1:hideall,state=4
:state=2,hudmouseup=yeshud 1:hideall,state=3
:state=3:hudimagefine=gamecore\guns\EAI\G36C\hud_icon.dds,hudname=guniconimage
:state=3:playertake,plrsound=audiobank\items\pickupweapon.wav,makehud=guniconimage None 20 50,destroy,state=4
:state=4:resumegame,hudhide=weapondetails,hidecursor
;End of Script
It gets up to pressing e then it freezes.
I think it might have something to do with the pausegame action but this is my first proper script so I'm not sure, can someone help me fix it please?
What I'm trying to make the script do is:
When you're near the gun pickup it shows a hud that says "Press e to examine", when you press e the game pauses and a hud that has the gun specs on it shows in the middle of the screen as well as a "yes" and "no" button.
If you click the yes button you take the gun and if you press the no button you just leave it.