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 / Ambience scripts --- Use a different ambience for each game level & ambience effects

Author
Message
Benjamin A
19
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 1st Jan 2007 11:12 Edited at: 9th Jan 2007 19:35
This was asked in Chat, but I'm sure others can use it also. There are different kind of ambience scripts for different kind of solutions.

The first script you can use control the ambience in each level of your game. Instead of having one overal ambience in all your levels, you can now have a different ambience for each level you create. Create a trigger zone, place it near the player. Attach a script to it that controls the ambience for that level. Do this in each level.



Change this script for each level and save it as a new file. You need a script file for each level.

You can also use a number of larger triggerzones and change the ambience within the level and have different ambience effects in your level.

This will give you a bright ambience in when the player is in a triggerzone.



This will give you a dark ambience when the player is in a triggerzone



This will give you a more normal ambience again.

;Header

desc = normal ambience by BenjaminA

;Triggers

:state=0,plrwithinzone=1:ambience=28,ambiencered=95,ambiencegreen=255,ambienceblue=255:state=0

;End of Script

You can use a number of these scripts in one level. Attach the scripts and others you've derived from them to triggerzones. When the player steps into the triggerzone the ambience will change. When he's steps into another a triggerzone, the ambiance will change again and so on.

Here are some fun ones:

'Disco' effect



Flickering lights:



EDIT: Here's the day night-routine as a little add-on to the original scripts:



You can change the timing as you like, but note that state 1 & 7 use larger number to really give the impression of a day and night, the others are dayrise and nightfall, they don't take as long as the day.

In case you don't know how create triggerzones and attach these to them I would direct you to the manual that's in your fps creator / docs folder and info that you can find on this forums.

http://www.gamefun4u.nl/index.html
GameFun4U, the ultimate funtainment. Cool Games and Resources for your own games.
bdgbdg
18
Years of Service
User Offline
Joined: 30th Jul 2006
Location:
Posted: 1st Jan 2007 14:56
Nice, but one thing...
When I get this to FPI Maker, it says it had a extra ":"

When I take off the : on the first "state=0" it sais the script is valid. Any idea why?

Project FPS - 71%
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 1st Jan 2007 15:23
Very nice of you to give us these Ben,thanks.
Benjamin A
19
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 1st Jan 2007 16:34 Edited at: 1st Jan 2007 16:43
Don't know anything about FPI maker and never use it, but the scripts as they are work fine and so don't take out anything, I've made them according to the scripting rules found in the manual.

Perhaps FPI maker doesn't deal with secundary actions and marks them as errors while it should not do so?

http://www.gamefun4u.nl/index.html
GameFun4U, the ultimate funtainment. Cool Games and Resources for your own games.
Cheese Cake
17
Years of Service
User Offline
Joined: 11th Dec 2006
Location: At the bakery
Posted: 9th Jan 2007 15:56
Thanks man you saved my life!!!

Therapy has taught me that nothing is my fault.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 9th Jan 2007 18:20
Nice scripts and tut Ben. This should go in The Guide as soon as Nicky sees it.

Best.

I'm sorry, my answers are limited. You must ask the right question.

Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 9th Jan 2007 18:36
Too late, already seen it and included it for the next revision


tyrano man
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location: Battle City - Kalspher :)
Posted: 9th Jan 2007 19:03
i love this! finally we can have outdoor levels in day and night! thanks for the scripts

Woot Kingdom hearts owns!
vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 9th Jan 2007 19:13
@bdgbdg

i think the : should be a comma instead

so what's the job?
Benjamin A
19
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 9th Jan 2007 19:30 Edited at: 9th Jan 2007 19:35
Quote: "i love this! finally we can have outdoor levels in day and night! thanks for the scripts"


Yes you can, here's the day night-routine as a little add-on to the original scripts:



You can change the timing as you like, but note that state 1 & 7 use larger number to really give the impression of a day and night, the others are dayrise and nightfall, they don't take as long as the day.

Have fun with it!

If you want anything else you have to figure it out yourselves

http://www.gamefun4u.nl/index.html
GameFun4U, the ultimate funtainment. Cool Games and Resources for your own games.
tyrano man
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location: Battle City - Kalspher :)
Posted: 9th Jan 2007 21:54
what i meant was we could have one level day and the next one at night etc.

but a level that changes from day to night...thats just amazing!

you continue to impress me ben.

Woot Kingdom hearts owns!
Benjamin A
19
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 9th Jan 2007 22:24
Quote: "what i meant was we could have one level day and the next one at night etc."


There no challenge in that Having it this way is much more fun

http://www.gamefun4u.nl/index.html
GameFun4U, the ultimate funtainment. Cool Games and Resources for your own games.
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 9th Jan 2007 23:13
Nice one ben, I just discovered this command myself. There are some pretty cool things you can do with this. I hadn't thought of day/night, but you can make some nice "fade to black"* effects

*literally fade. not the 90's game

FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 9th Jan 2007 23:44
Now we can add a solar eclipse to our games.
Good job,Ben.

Benjamin A
19
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 9th Jan 2007 23:50
You also simulate a atomic explosion or something like it when the player walks into a trigger zone, but I'll leave that to all of you to figure out how to do

http://www.gamefun4u.nl/index.html
GameFun4U, the ultimate funtainment. Cool Games and Resources for your own games.
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 10th Jan 2007 01:01 Edited at: 10th Jan 2007 01:03
Quote: "Nice, but one thing...
When I get this to FPI Maker, it says it had a extra ":"

When I take off the : on the first "state=0" it sais the script is valid. Any idea why?
"


I know why. Look.

;Header

desc = ambience by BenjaminA

;Triggers

:state=0,always:ambience=3,ambiencered=25,ambiencegreen=25,ambienceblue=155
:state=0

;End of Script


The underlined symbol should be either a ' , ' or just remove the whole second ':state=0' . Since it never automaticly increases the state, the extra 'state=0' actually isn't nessasary.

Thanks for the scripts Ben

tyrano man
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location: Battle City - Kalspher :)
Posted: 11th Jan 2007 21:39
ive noticed a problem for the light scripts when i tried to make my own.

if you have a light routine like your disco/day or night routine; the lights will only change when you are in the trigger zone. when you exit the trigger zone the light will just stay on the last amibience setting that it was on.

Woot Kingdom hearts owns!
Benjamin A
19
Years of Service
User Offline
Joined: 31st Oct 2005
Location: The Netherlands
Posted: 11th Jan 2007 22:07
That's not a problem, that's the way the script has been designed on purpose! Once you get out of the zone, you're supposed to enter a different trigger zone with a new ambience script attached to it.

http://www.gamefun4u.nl/index.html
GameFun4U, the ultimate funtainment. Cool Games and Resources for your own games.
Pus In Boots
19
Years of Service
User Offline
Joined: 5th Nov 2005
Location: S.M.I.L.E. industries
Posted: 12th Jan 2007 16:57
Quote: "When I get this to FPI Maker, it says it had a extra ":""
FPI maker? Just copy and paste an existing FPI script and replace it with you script.

Your signature has been erased by a mod. How about that?
tyrano man
18
Years of Service
User Offline
Joined: 26th Oct 2006
Location: Battle City - Kalspher :)
Posted: 12th Jan 2007 17:39
I know but you then you can't have day and night sequences without placing a big trigger zone through the whole map.

Woot Kingdom hearts owns!

Login to post a reply

Server time is: 2024-11-23 08:47:24
Your offset time is: 2024-11-23 08:47:24