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 / [LOCKED] Using trigger zone to destroy an entity

Author
Message
Pus In Boots
19
Years of Service
User Offline
Joined: 5th Nov 2005
Location: S.M.I.L.E. industries
Posted: 8th Jan 2007 18:33
Would someone be able to make a script for a triggerzone that destroys an entity specified in the IFUSED field. I've used the search tool, but it's mostly switches or threads too old to respond to.

Your signature has been erased by a mod. How about that?
G4fan
18
Years of Service
User Offline
Joined: 21st Oct 2006
Location: in my car, driving on and on. . .
Posted: 12th Jan 2007 00:34
All you need to to is make the entity dynamic, go to Respawn\spawn life and make it one, and: Spawn at Start to "No".

Then, name you entity "ent1" or whatever...

Then put in the script in the trigger zones Main AI to
plractivateifused.fpi.

And in the If Used field put your entity name.
i.e.- If Used|ent1

There you go.

Best of Luck,
G4fan

My first game: "Wars of Crime"-35% completed
filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 12th Jan 2007 00:59
how would that destroy the entity G4Fan???

-- game dev is fun...but taking up too much time --
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 12th Jan 2007 02:08
For your zone, use the plrinzoneactivateused.fpi as it's AI Main. In it's If Used box, place the name of the entity you want to destroy. Use this script for the entity AI Main.
Quote: "
;Artificial Intelligence Script

;Header

desc = Destroy if Activated (destroy)

;Triggers

:state=0:state=1
:state=1,activated=1:destroy

;End of Script
"


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

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:36
Works fine. Thanks for the script. But I can't get it to explode. Any suggestions?

Your signature has been erased by a mod. How about that?
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 12th Jan 2007 17:10
Destroy doesn't mean explode. In order for an entity to explode, it's explodable setting must be set to yes, and it must receive a force or blow greater than it's own strength. At least that's the only way I can think of at the moment.

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

incense
18
Years of Service
User Offline
Joined: 25th Nov 2005
Location:
Posted: 3rd Apr 2007 20:23
xplosys,

I cant get your script to destroy an dynamic entity.
I added a trigger zone and gave it your destroy script and set the "If Used" to the name of the entity that I wanted destroyed.
It didnt destroy the entity when I walked through the trigger zone.
I figured that should work.
Is there something else that I should have done

The person that now knows the most started with many questions. Patients and tolorance are the keys to the passage of knowledge. FPSC is Getting better. Now if we can just keep the ball rolling.
incense
18
Years of Service
User Offline
Joined: 25th Nov 2005
Location:
Posted: 3rd Apr 2007 20:23 Edited at: 3rd Apr 2007 20:36
Got it working now.

Ty ty ty ty ty ty ty!!!!!!!!!!

Great work!!


How would I get it to use 2 trigger zones. one trigger zone to spawn an entity and one trigger zone to destroy the same entity?

The person that now knows the most started with many questions. Patients and tolorance are the keys to the passage of knowledge. FPSC is Getting better. Now if we can just keep the ball rolling.

Login to post a reply

Server time is: 2024-11-23 16:38:12
Your offset time is: 2024-11-23 16:38:12