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 / Script help

Author
Message
TBreiter
16
Years of Service
User Offline
Joined: 29th Jul 2008
Location:
Posted: 29th Jul 2008 21:59
Hello

This is what I am wanting to do. You have an object that would be a power source when the object is exploded it would kill all the lights in the level. Has anyone made a script like that or any tutorials on a script like that. Thank you for your time.
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 29th Jul 2008 23:31
That's simple with global variables (should be possible with existing scripts using IFUSED but I've already whipped these up):

Main script for your (dynamic) lights


Destroy script for your generator/power source:



The only reason you would probably need to use variables as I did above and not IFUSED is if you want something that can say, still be activated, but only when the power is on or off. Like a door that is activated by a switch that could still be affected by the power state.

Change the globalvar=3 to whatever free global variable you have.

TBreiter
16
Years of Service
User Offline
Joined: 29th Jul 2008
Location:
Posted: 29th Jul 2008 23:50
Hey thank you for your help.
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 30th Jul 2008 00:59 Edited at: 30th Jul 2008 01:00
That stript will now work.

There ate two colons in the first line of the light conde.

-edit- nevermind. You could always just use "always."

TBreiter
16
Years of Service
User Offline
Joined: 29th Jul 2008
Location:
Posted: 31st Jul 2008 04:37
Hey guys thanks for the help. But I have one more question. When a object is destroyed it disappears. I dont want it to disappear I want it to be visiable with an alt texture. How would I go about doing that.

Example: destroy power source change to burnt texture stop any sound that it makes power sorce is dead.


Thanks for the help
Minimovies Inc
16
Years of Service
User Offline
Joined: 22nd Feb 2008
Location: Reeedwwwaaallll!!!
Posted: 31st Jul 2008 14:19
In that case you don't need to destroy it... I know there is a simple way to do this, but I don't have time to script it now.

A starting Games Designer. Need levels, characters and anything drawn and designed? Let me know...
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 31st Jul 2008 23:46
Just place the destroy line with alttexture=1 and set a global var to one, then in the other script, set it up so that after the variable is set to one, the lights go out.

TBreiter
16
Years of Service
User Offline
Joined: 29th Jul 2008
Location:
Posted: 1st Aug 2008 02:52
Thanks guys I will try it out.

Login to post a reply

Server time is: 2024-11-24 11:42:06
Your offset time is: 2024-11-24 11:42:06