Hi all,
This isn't normally something that I'd do, but I have a major script clash and I can't get them working together. I'm fairly sure that they worked prior to one of the updates but can't now be sure from memory.
The first script attached to a row of switches and prevents the player from using more than one switch at a time. (i.e. you must reset one switch to use another).
;Artificial Intelligence Script
;Header
desc = Use Switch (animated lever)
;Triggers
:state=0:globalvar=3
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\reset.bmp,hudname=reset,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\pulllever.bmp,hudname=pullit,hudhide=1,hudmake=display,state=10
:plrdistwithin=50,varequal=0:hudshow=pullit,hudfadeout=pullit
:plrdistwithin=50,varequal=1:hudshow=reset,hudfadeout=reset
:state=10,plrdistwithin=50,varequal=0,plrusingaction=1:state=1,setframe=0,plrsound=$0,activateifused=1,setvar=1
:state=1:incframe=0
:state=1,frameatend=0:state=2
:state=2,plrusingaction=0:state=3
:state=3,plrdistwithin=50,plrusingaction=1:state=4,plrsound=$1,activateifused=0,setvar=0
:state=4:decframe=0
:state=4,frameatstart=0:state=5,setframe=0
:state=5,plrusingaction=0:state=10
;End of Script
The second script simply restores health every few cycles to the player (please don't comment on the use of variables instead of timers, the timers are used else where in the game unfortunately) - The script sits in a dynamic, always active object somewhere in the background.
;Artificial Intelligence Script
;Header
desc = Health
;Triggers
:state=0,globalvar=7,setvar=0:state=1
:state=1:incvar=1
:state=1,vargreater=300:plraddhealth=1
:state=1,vargreater=300:setvar=0
;End of Script
Now the problem I have is that both of these scripts work perfectly independently but when run together neither of them work. I can't see any clash.. Can anyone please spot anything wrong that I've missed or is there a problem with one of the updates?
Thanks again in advance.