Quote: ":state=0,shotdamage=4:addvar=Shot 1"
Where is this line located? If it were me, I'd tag addvar=shot 1 onto the death script.
I'm not particularly sure if there's a mistake in the trigger zone code as I don't tend to use the settarget or activate target commands. A potential work around is instead of using those commands do this:
:varequal=Shot 4:setvar=Shot 10
:vargreater=Shot 4:setvar=Shot 10
And you'd simply change the door script to be like:
:state=0,varequal=Shot 10:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,activated=2:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:setframe=0
In theory, that should work just the same? This is all based on the idea that the 'Shot' variable will only be used in that situation, and since you
know that variable will be 10 it can be used to your advantage. If you know its 10 then the door should be opened, because the previous conditions are met.
It may not be the tidiest use of a variable, but it my games I often use the same variable the progress is linear. It helps me keep track of things because I can very easily point out the flaws of a script. Even if it goes beyond the original intent or meaning of the variable itself, it still works.
- An Instinctive Fear IndieDB page, download demo today!