Posted: 11th Aug 2010 16:25
Hello,
I want that different weapons have different effects on an entity. For testing purpose I'm using a box with this main script:
;Artificial Intelligence Script
;Header
desc = Different beheviour for different weapons
;Triggers
:state=0:state=1
:state=1,usingweapon=0:state=2
:state=1,usingweapon=1:state=3
:state=1,usingweapon=2:state=4
:state=1,usingweapon=3:state=5
:state=2,SHOTDAMAGE=1:fpgcrawtext="Hallo0",ADDHEALTH=25
:state=3,SHOTDAMAGE=1:fpgcrawtext="Hallo1",ADDHEALTH=25
:state=4,SHOTDAMAGE=1:fpgcrawtext="Hallo2",ADDHEALTH=25
:state=5,SHOTDAMAGE=1:fpgcrawtext="Hallo3",ADDHEALTH=25
;End of Script
[\code]
I thought that I can assign the weaponnumbers using the following code, when picking the weapons up. (Just one line changed from the original version.)
;Artificial Intelligence Script
;Header
desc = Weapon Pickup
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupaweapon.tga,hudname=weaponprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40:state=1,gunslot=1,playertake,coloff,rundecal=-1,plrsound=audiobank\items\pickupweapon.wav,hudshow=weaponprompt,hudfadeout=weaponprompt
;state=2:state=3,playerdrop,colon,plrsound=audiobank\items\pickup.wav
:state=3,plrdistfurther=65:state=10
;End of Script
[\code]
Can anybody give me a hint, where the error is in my script?
cheers
sberK