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 / How can i make this?

Author
Message
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 3rd Mar 2005 20:26
Hi


In my fpsc game i need a script that can make the ambience light in a level dark. How can i make i script that will make the ambience light dark when i hit a trigger zone?

Thanks


looking for Royalty free 3D objects?
then Check PanzerGames at this link : http://www.freewebs.com/panzergames
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 3rd Mar 2005 22:57
Have a look at the ambience commands in the manual, they are what you need.

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!"
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 3rd Mar 2005 22:58
This thread will give another clue.

http://forum.thegamecreators.com/?m=forum_view&t=48993&b=23

----
"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!"
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 4th Mar 2005 22:17
I did try making my own. The script looked like this:



But when i use that on a trigger zone i don`t have any effect on the ambient light.

Then i tried making this:



I didn`t worked eaither.


looking for Royalty free 3D objects?
then Check PanzerGames at this link : http://www.freewebs.com/panzergames
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 4th Mar 2005 23:09
I have tested this script (my first one).
It makes the ambient light nearly pitchblack.
But i have not set the trigger at the same position like the player start position:

jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 5th Mar 2005 22:43
@The Nerd, The format of a line of FPI script is..

:{condition(s)}:{action(s)}

So (Similar to ctm's) something like:

:state=0,plrwithinzone=1:state=1

state is always zero when the script first runs so here we are checking that state=0 and the player is in the trigger zone, if both these conditions are true then we set the state to 1.

:state=1:ambience=5,state=2

This will only activate when the first line of the script is satisfied, when that happens the state veriable is set to 1. As soon as that happens the condition above is met so we run the command ambience=5 then set the state to 2. With out this the script will keep setting the ambience to 5 for ever more. Setting the state to 2 at the end will make the script stop runing as there is no state=2 conditions in the script.

Basicaly this is a trigger once only scenario i.e. once we have triggered the script via the trigger zone it will do it's code then finish. As we will never have the state being 0 again, it will never match the state=0,plrwithinzone=1 again.

If we wanted to make it a trigger that will activate once, every time we entered the zone you will need to change it to this:

:state=0,plrwithinzone=1:state=1
:state=1:ambience=5:state=2

:state=2,plrwithinzone=0:state=3

As you can see we have now added a state=2 condition so the script will now carry on. We have also added a new condition, plrwithinzone=0, which means the player must leave the zone before this line will activate.

:state=3:ambience=100,state=0

Once the player has left the zone, it will change that state to 3. And this line above will set the ambience light to 100% and will set the state back to 0. As the state is now 0 the script is still active waiting for the player to enter the trigger zone again.

The upshot of this script means that if the player enters the zone, it will get dark, and when they exit the zone it will get bright again.

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-11-23 08:19:11
Your offset time is: 2024-11-23 08:19:11