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 / Shoot entity and destroy light

Author
Message
Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 13th Nov 2012 18:40
Can you write scripts to destroy an entity and the light goes out?

with the description and how to use them?
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 13th Nov 2012 20:31
and you can read this first
http://forum.thegamecreators.com/?m=forum_view&t=126004&b=23
this is not acceptable. I hope nobody will write this script for you, even when it is very easy! There is a request thread in this script forum from me, but with this unpolite request, i will not do anything for you.

Corno

you need a script? I need useful requests at the moment!
http://forum.thegamecreators.com/?m=forum_view&t=200918&b=23
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 13th Nov 2012 20:53
Quote: "Can you write scripts to destroy an entity and the light goes out?"


In the destroy script for the entity, ensure you use "settargetname=x", where X is the name you use for the light marker; then use "activatetarget=1". In the script for the light, you have a section where it is checking to see if it has been "activated" and if so, it then uses the "lightoff" command.

For example... here is a sample default destroy script used, called "disappear1.fpi":

crate's disappear1.fpi



Then we have the script for the light marker. Make sure it is "dynamic" or the script does nothing.

light1.fpi"



When the player destroys the crate, it will activate the set target name. So if you placed a light marker and call it "light1", then in the script you need to have "settargetname=light1". Once activated, the light turns off.


There's no problem that can't be solved without applying a little scripting.
Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 13th Nov 2012 20:54
sorry ...

my english is from "google translate".

I did not want be impolite .

...and i'm backer of FPS Creator Reloaded .
Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 13th Nov 2012 20:57
Thank "BlackFox" !
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 13th Nov 2012 21:14
No problem.

Just remember a lot of times you can "modify" existing scripts to achieve what you need. You may just need to add an extra command or two, but you get the idea.


There's no problem that can't be solved without applying a little scripting.
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 13th Nov 2012 21:28
Thanks as well BlackFox, I didn't know about the settargetname command. Much better than using activateifused=1 and the If Used parameter in the editor. Those commands could also be used to activate multiple targets from the same entity.


Slenderman's Shadow - Sanatorium
http://forum.thegamecreators.com/?m=forum_view&t=199408&b=35
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 13th Nov 2012 21:32
Quote: "Thanks as well BlackFox, I didn't know about the settargetname command. Much better than using activateifused=1 and the If Used parameter in the editor. Those commands could also be used to activate multiple targets from the same entity."


You're welcome. We use the "settargetname=x" quite a bit in our scripts. It is nice when one script can use it multiple times for activating things, etc instead of having multiple scripts doing the same thing. Keeps the scripting down to a minimum in some cases.


There's no problem that can't be solved without applying a little scripting.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 23rd Nov 2012 02:16
Thank You Blackfox, I too didn't know of the settargetname command. I looked right into it, will save alot of time.
You always do have nice clean scripts!
Thank you again.

Login to post a reply

Server time is: 2024-11-23 19:41:55
Your offset time is: 2024-11-23 19:41:55