Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / npc shall only spawn if a switch isn't activated

Author
Message
Knobibrot
15
Years of Service
User Offline
Joined: 12th Nov 2009
Location:
Posted: 8th May 2010 11:40
Hey guys,

I'm currently working on a special spawn-script for my game.

The idear is: There is a switch in a room.
If the player uses the switch, a mashine stops/starts or a door opens
but also an npc WON'T spawn, because he did everything right.
If he doesn't uses the switch, the npc will spawn when he pases the trigger-zone.

I'm working with the variable-system and I'm using globalvar#1 to test if the player used the switch or not.

this is what I've got so far:

triggerscript:


switch-script:


But it is not working.
If I don't use the switch and pass the trigger-zone,
nothing happens.
Any idears?
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 8th May 2010 13:40
Hi Knobibrot,

The triggerscript does not work because you forgot a colon after state=1 in the 3rd line:

Quote: ":state=1,activateifused=1,sound=$0,state=1
"


this way it should work:
Quote: ":state=1:activateifused=1,sound=$0,state=1
"


Is it intended that the player has to use the switch 2 times to set globalvar to 1?
Knobibrot
15
Years of Service
User Offline
Joined: 12th Nov 2009
Location:
Posted: 8th May 2010 16:14
this is what i've got now:

Login to post a reply

Server time is: 2024-11-25 00:17:35
Your offset time is: 2024-11-25 00:17:35