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 / "Light Pulse", my first script

Years of Service
User Offline
Joined: 2nd Feb 2006
Location: London -UK
Posted: 16th Feb 2006 16:32
I made my fisrt script
it makes the light pulse on and off,
for red alarms and sirens in your games,
I added it for an escape level at the end of my game
here it is

add it to your "Main" section of any light,
if you have a blue light, and you add it, then it will flash like a police car
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 16th Feb 2006 16:50

-Half Death- A game like Half Life 2 in progress...
Les Horribres
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 16th Feb 2006 21:26


Just an example of a little cleaner code...
Instead of increasing timer all the time, you can reset it. This is a little easier when talking about repeating patterns. If you are doing a sequence, you probally will want to know what time it is.

activate and activated are the second variables in FPSC, sorry, no more (well, good ones). Activated is the conditional, and activate is the action.

incstate= is useful with sequences, since instead of constantly typing the next state, you simply set the =1 and it goes to the next state. Decstate is it's oppisite.

Welcome to the coding community. Shakes Hand.
Conjured Entertainment
AGK Developer
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 17th Feb 2006 08:13 Edited at: 17th Feb 2006 08:15
Well done fantasy!

Excellent example of the use of incstate and decstate Merranvo.

Sweet Logic.

Don't forget to visit

Support Your Local CE-FPSC Chapter
Retired Moderator
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 13th Mar 2006 00:28
Thanks.This will come in handy.

Not changing this sig until I get rich

Login to post a reply

Server time is: 2020-08-03 19:19:22
Your offset time is: 2020-08-03 19:19:22