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 Product Chat / Something I've just worked out to do. A alert button.

Author
Message
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 13th Feb 2005 06:05
Thanks to help from Lee with scripts.

Firstly here is the level which needs to go into your mapbank directory.

http://www.tyranntrpg.org/alert/alert.fpm

Next here is a wav file that needs to go into audiobank\user directory (Unless you adjust the following script)

http://www.tyranntrpg.org/alert/siren1.zip

Next you need to create the following script and put it into the scriptbank\user (The level will look for it there, called lightoff_alert.fpi)



The next script is to go in the same place an is called static.fpi.



This is the map:



The light in the middle of the room is a dynamic light (So you need the dynamic lighting box checked in the preferences for it to work)

This light uses the script lightoff_alert.fpi shown above. This was basically copied from the lightoff.fpi script in the main script bank. You will see it's initial state is 2 which is making the light white. When it is activated it will change the light to red and play the sample contained in the siren1.zip file above.

The AI Characters at the bottom of the map use the static.fpi script above which is modified from the static script supplied with FPSC. In it's initial state it is not doing anything, it's waiting to be activated. Once activated it will run at the player shooting.

The name of the light entity and all the character entities is "alert". There is a reason for this is to be able to activate then all from the light switch. The light switch uses a standard script but has the following in the IFUSED section:



The upshot of it is, when the switch is used, it activates all entities called alert.

When run, the following small movie is what happens.

http://www.tyranntrpg.org/alert/alert.wmv

Jas

----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"
Prancer
19
Years of Service
User Offline
Joined: 6th Feb 2005
Location: Idaho, US
Posted: 13th Feb 2005 06:10
Cool. I was actually working on one right now, but that beats the heck out of mine! I'll definitly apply it to my game.
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 13th Feb 2005 08:13
Post you level when you've done it to the forum, would love to see it.

Jas

----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"
spg34us
19
Years of Service
User Offline
Joined: 11th Feb 2005
Location: United States-- South East
Posted: 13th Feb 2005 13:06
Hi Jas,
I see that your bringing us some good stuff from your bag of coding trick's allready.I watched the small movie and loved it.My son was in the other room when the sireen went off in the demo clip, he come running in here saying dad what is that? After showing him the movie clip, he said dad that guy is really cool.I just laughed, because my son is only 7 years old.I did tell him your name "JAS" so you now have a little fan club with my kids. Have a great day my friend.
Steven Ginn
spg34us@yahoo.com
[href]www.interginn.com[/href]
Chimera
19
Years of Service
User Offline
Joined: 18th Dec 2004
Location: Belgium
Posted: 13th Feb 2005 18:44 Edited at: 13th Feb 2005 19:34
Jasuk you had MSN working when you recorded that movie



Quite funny, it took me a couple of minutes to realise that it came from the movie and not from my MSN

Don't eat yellow snow!
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 13th Feb 2005 18:51
Thanks for the comments. As people start to learn FSPC and share their ideas, the more interesting everyones games can be. You never know, someone out there might do something that even the developers didn't realise could be done

Yup, someone sent me a message while i was recording

Jas

----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"

Login to post a reply

Server time is: 2024-05-02 03:33:20
Your offset time is: 2024-05-02 03:33:20