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 / Entity enter in zone = happen something

Author
Message
SAK studi0
15
Years of Service
User Offline
Joined: 31st Oct 2010
Location: SAK studi0
Posted: 9th Nov 2010 16:24 Edited at: 9th Nov 2010 22:55
Hi everyone. I hope someone can help me for this script. I want when some entity enter in some zone to happen something, like open door. I see this guys are already make it -http://www.wraithgames.org I search in PDF document for scripting and found this codes:
ENTITYWITHINZONE is true when an entity is within the trigger zone
ACTIVEALLINZONE Activates everything within entity zone
ANYWITHINZONE is true when any entity is within its zone
ANYFURTHER=X is true when any entity is further than X from it
ANYWITHIN=X is true when any entity is closer than X to it

Can i use them for my script and how, i try but whit no success.
AVPR
16
Years of Service
User Offline
Joined: 20th Jul 2010
Location:
Posted: 12th Nov 2010 10:56
What do you want your entity to do in the zone?
SAK studi0
15
Years of Service
User Offline
Joined: 31st Oct 2010
Location: SAK studi0
Posted: 13th Nov 2010 19:42
When the entity enter in zone to activate something, like open remote door.
Conjured Entertainment
AGK Developer
20
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 14th Nov 2010 00:19 Edited at: 14th Nov 2010 00:31
This
  uses a remote door named 'myremotedoor' but you can name the door whatever you want.

If you have one on the other side of the door using activatetarget=0 instead of activatetarget=1 then it will close it again when they pass thru.

Make sure you use a remote door that is assigned the doorremote.fpi script for it's AIMAIN


EDIT
Oooops!
I just noticed you wanted an entity to trigger the zone, not the player as in the script I gave you above.

Just relace the plrwithinzone with entitywithinzone, and you don't need the outof zone check if you want it to only happen once.
Like this
.

Either way, it is as simple as setting a remote door for the target, and then activating it when something goes in the zone.

   Conjured Entertainment

 WARNING: Intense Madness
zeza
18
Years of Service
User Offline
Joined: 27th Jun 2008
Location:
Posted: 14th Nov 2010 02:54
Unfortunately, the code for entitywithinzone is just a todo note, atm it will not work

I'd change the world, but I don't have the source code
R.I.P. heltor, we will miss you
SAK studi0
15
Years of Service
User Offline
Joined: 31st Oct 2010
Location: SAK studi0
Posted: 14th Nov 2010 15:49
Thank you Conjured Entertainment for the help, but it not work. Maybe zeza is right (the code for entitywithinzone is just a todo note, atm it will not work). Where must be put your script, on the Trigger Zone? I try it, but no.
Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 14th Nov 2010 18:32
Option 1:
Yes, it is just a todo note, however, if memory serves correctly the command "anywithinzone" is not a todo note and should work fine in place of entitywithinzone.

Option 2:
If you're wanting a specific entity to act as the activator (meaning the player MUST put that specific entity into the zone for the door to open and any other entity will not work) then you will need to use "anykeywithinzone" which checks for if the zone's "UseKey" specified entity is within the zone... now, we all know that triggerzones don't have that option, but you can get around that (just as I did a long time ago with my puzzle game) by making your own "zone" and specifying the UseKey in it's FPE file. It's a long-winded process, but it works.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.
SAK studi0
15
Years of Service
User Offline
Joined: 31st Oct 2010
Location: SAK studi0
Posted: 14th Nov 2010 21:44
I dont know how you did it Plystire. Can you explain exactly how can i make it, how can i make my own "zone". Thank you for the help.
Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 15th Nov 2010 21:36
Sure thing!

Go into this folder: "Files/entitybank/_markers"

You will see a bunch of files, some related to lights, some related to zones.

Scroll down until you find the following TWO files:
Trigger Zone.bmp
Trigger Zone.fpe


Copy those two files and paste them into that same folder. This will give you copies of those files. Now rename the copies to "My Zone.bmp" and "My Zone.fpe"

Now, you should be able to boot up FPSC, and see your new zone in the marker area of the editor (same place the triggerzone is at).

To give your new zone a "usekey" value, open the "My Zone.fpe" file and you SHOULD see a line in there for "ifused =" that doesn't equal anything. Right underneath that line, add the following:

usekey = NameOfEntity

Save that and your new zone now has a UseKey option set to "NameOfEntity". If you know how the "UseKey" option works (like for doors that require keys) you can now use your zone in a similar fashion, but I recommend using the "anykeywithinzone=1" command with it. Remember, the "key" for your zone must be given the same name that you put into the FPE file (In this example's case, the name would be "NameOfEntity")


Hope that all made sense. Good luck!


(Any of the scripters passing through here, can you please check my file names and folders and make sure they're correct? I don't have FPSC installed to make sure, just running this out of memory. )


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.
SAK studi0
15
Years of Service
User Offline
Joined: 31st Oct 2010
Location: SAK studi0
Posted: 15th Nov 2010 23:01
Thank you very much Plystire it work.
Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 17th Nov 2010 20:01
Glad to hear it! It woul dbe nice to have the UseKey option in the Editor for zones, so taht we wouldn't have to go through all of this and can just stick with regular triggerzones for everything.


The one and only,


Only those who sow the seeds of their desires will reap their benefits later.
However, I have seeds of my own to tend to. I don't have time to be someone else's watering can.

Login to post a reply

Server time is: 2026-07-26 08:39:17
Your offset time is: 2026-07-26 08:39:17