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 Product Chat / Destroying Entities

Author
Message
SarusX
19
Years of Service
User Offline
Joined: 21st Jul 2005
Location: Behind u- thats where a rangers gonna be
Posted: 4th Mar 2006 01:35
How can I make an entity be destroyed when the player walks into a zone? Any help would be appreciated. Thanks.

Something witty and/or humorous.
uman
Retired Moderator
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 4th Mar 2006 01:59 Edited at: 4th Mar 2006 02:03
You could do it using the the load unload scripts I posted or similar. If you just want the entity destroyed simply with no other criteria to meet when a player enters a trigger zone that will do it. But it may not meet your requirements.

Depends on how much if any contorl you have over the entity as to how you could do it exactly. i.e. depending upon if you want the entity to be in a certain position or location at the time its destroyed if it moves around - you dont say if the entity is fixed or moves about in which case it might be important to you to have it destroyed at an exact position.

All that would be required would be zone to activate a destroy command in the entities script or something else such as acivating some other object which would effectively kill the entity instantly - based on a criteria e.g. player poximity or other. (even if that means activating another zone to kill the entity. There are actually few criteria you could use in FPSC as the engine dont give us many commands, variables and so on. Apparently a script can also call another script so I guess if that could be done then the entities script could call another which would destroy it?

Those are just some ideas - the load and unload scripts cover use of all the things really involved in setting something like this up.

This is not an easy one if you need exact control of the entities involved and you may need strict control - I dont know as you dont describe the exact scenario. Otherwise the load and unload scripts should do the job for you...just set the entity spawn to 1 obviously so it dont come back again.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 4th Mar 2006 02:29 Edited at: 4th Mar 2006 02:41
:plrwithinzone=1:runfpidefault=2

Add that to the entity's AIMAIN to use the entity as the trigger.



If you use a trigger else where, then put the entity in the IFUSED of the trigger.
Then, use the following for the trigger's AIMAIN...

:plrwithinzone=1:acitvateifused=1

And put the following in the AIMAIN of the entity...

:activated=1:runfpidefault=2



                                   

Don't forget to visit Conjured Entertainment

Login to post a reply

Server time is: 2024-10-07 09:15:43
Your offset time is: 2024-10-07 09:15:43