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 / Variation of 'Shoot enemy to open door'

Author
Message
TZap
19
Years of Service
User Offline
Joined: 29th Aug 2005
Location:
Posted: 15th Jul 2008 23:38 Edited at: 15th Jul 2008 23:39
I created a method, added to fpsc guide, allowing a door to open if a certain number of enemy in a room were destroyed. This is a situation in some fps games I have played. Shoot a number of enemy in a room allowing level progression (i.e. a door opened).

Variables now make this simple.

Set the following destroy script to each of your enemy. Say you have 3 in a room but the exit door is not open.

:state=0:state=1,globalvar=1
:state=1,alphafadeequal=100:decalphafade=0
:state=1,alphafadeequal=0:state=2,destroy,incvar=1

Add a door and set the following as it's main script:

:state=0:globalvar=1
:state=0,varequal=3:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff,setvar=0

Shooting the 3 enemy will open the door. It will stay open.
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 15th Jul 2008 23:43
This requires update 1.09, though. It looks like it should work, though.

TZap
19
Years of Service
User Offline
Joined: 29th Aug 2005
Location:
Posted: 16th Jul 2008 00:22
Tested and it works fine. You could use variations to trigger other events..not just open doors. Make a key or other item appear in the middle of the room on a pedestal for example.

Login to post a reply

Server time is: 2024-11-24 10:26:29
Your offset time is: 2024-11-24 10:26:29