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 within zone

Author
Message
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 19th Mar 2008 20:57
ENTITYWITHINZONE is true when an entity is within the trigger zone

Anybody get this to work as is stated? I tried a dramatic destroy action on a character entity as it would walk through the trigger zone.

Script in code:


Entity is to walk towards player and when enters trigger zone will be destroyed. What happens is that the entity is destroyed immediately. Totally gone, don\'t even see it. Taking out the trigger zone that is between the entity and player -- same result. Taking out the this line :state=0,entitywithinzone:destroy,state=1, then the entity is visible and the character walks towards the player and stops on cue.

Apparently the condition is broken and is always true whether the entity is in a trigger zone or not.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 19th Mar 2008 21:06 Edited at: 19th Mar 2008 21:13
I'm a little confused. What is this script used on, the entity or the zone?

To my knowledge, entitywithinzone only works in a zone script. If this is a script for a character, then what zone does it refer to? If there is no zone, then the next command... destroy is executed... I guess.

Best.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 19th Mar 2008 21:15
I think he is using it in a zone, xplosys.


@Flatlander:

I posted about this in some other thread, I think it was the "power scripts" thread, but that command has nothing in it. Lee never coded the thing. There's still a "TODO:" coding remark for it.


The one and only,
~PlystirE~

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 19th Mar 2008 21:18
Quote: "I think he is using it in a zone, xplosys.
"


Then I'm even more confused. How does this work in a zone?

Quote: ":state=0,plrdistfurther=41,plrcanbeseen:rotatetoplr,movefore=10,animate=2
:state=0,plrdistwithin=40:freeze,animate=1
"


Best.

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 19th Mar 2008 23:00 Edited at: 19th Mar 2008 23:02
I'm afraid this is going to take some explaining as I have tried every which way but loose.

First of all, it is a condition. The definition for this condition:

is true when an entity is within the trigger zone.

It does not tell you which trigger zone and therefore I assumed at first any trigger zone.

The first thing I tried to do before finding this possibility was using the script "zoneanyactivate.fpi" which comes with FPSC.

Here is the code which is not my code but TGC's.



You notice that it uses the "anywithinzone" condition and has a value of 1 or 0 (true or false). This I assumed was something you put in the trigger zone main. I tried that. Doesn't work with an entity.

Here is what I put for the entity main along with the above TZ main.



The TZ code should have assigned the activation variable of the entity within the ifused parameter a 1 and therefore condition state=0,activated=1 should have been true. But nothing happens when the entity walks through the zone.

Before I continue, I'll let you wrap your head around this one first as it uses a different condition, other than the one I was asking about. Although, I'm trying to get the same result: An entity activating a trigger zone.

If anybody has used "zoneanyactivate.fpi" that TGC supplies and it works for you let me know how you used it. I'm at a loss.

BTW, xplosys, I was using it with an entity main as it seems the description of the condtion led me to believe it would be used with the entity rather than the TZ because TGC already had an fpi (supposedly) for the trigger zone.
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 19th Mar 2008 23:18
...that TGC, they're always full of little surprises.

ARE YOU A LONE WOLF? CLICK BELOW TO JOIN THE PACK.

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 19th Mar 2008 23:30
Quote: "Lee never coded the thing. There's still a "TODO:" coding remark for it."


It sure would be nice nice to have a list of the commands that aren't coded. Some of us have spent endless hours trying to get them to work. LOL

I have had anywithinzone to work for me when it was in the zones script. Beyond that, I'm at a loss.

Best.

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 19th Mar 2008 23:36 Edited at: 19th Mar 2008 23:37
Quote: "You notice that it uses the "anywithinzone" condition and has a value of 1 or 0 (true or false). This I assumed was something you put in the trigger zone main. I tried that. Doesn't work with an entity. "

Do mean character when you say entity?

Edit

I have used anywithinzone with bloodsplats before and it worked.

Don't forget to visit Conjured Entertainment

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 19th Mar 2008 23:37 Edited at: 19th Mar 2008 23:38
OOps, sorry for the double post.
It was an accident.

Don't forget to visit Conjured Entertainment

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 19th Mar 2008 23:37
That's what I was afraid of. The entitywithinzone probably doesn't work either. Never mind. I'll just continue doing things the hard way for what I want to do.

Yes, Seth, they strike again.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Mar 2008 00:26 Edited at: 20th Mar 2008 01:27
Brain Blast!

.
.

Sorry, don't know where that came from.


Anyway, I just had an idea.

If you're looking to activate the trigger zone with any specific entity, you can, so long as the entities that activate it are all named the SAME thing.

Here's how it goes:

There's a command I found lookin through the source, and turns out that it's NOT in the manual. You're gonna want to use this command, so I'll make up some sort of documentation for it:

Quote: "ANYKEYWITHINZONE=X

is TRUE when an entity is within the zone and the entity's Name is the same name as the one specified in the zone's "Use Key" field."


This command is FUNCTIONING, I've made it work before in my Spy Trainer game. The drawback to this command, is (as you might have noticed) zone's don't HAVE a "use key" field in their properties.

To overcome this, you'll need to make a zone entity in the entity bank, complete with thumbnail image and fpe file, and in it's fpe file, you'll specify:

usekey = <name of entity that you want to effect the zone>

Now, as extremely unfriendly and static as this workaround is (since you'll need a new zone entity for each entity name), it will work the way you want it to.

This method is great for puzzle games where you only want to check if a specific object is in a zone (for putting crates on panels and whatnot).


I hope this helps you out. Good luck!


The one and only,
~PlystirE~

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 20th Mar 2008 01:20
CE, I guess I could be confused. I thought characters were entities and, yes, I mean a character type entity such as Aiko or Thug and so I figured "any entity" would work as mentioned in the descriptions. Thanks for the reply. Appreciate it and will try to still figure out how anywithinzone works. Will try to use a blood splat. Maybe I am still confused as to how it is supposed to work and am approaching it the wrong way. Anyway, I have plenty of time on my hands.

PlystirE, thanks for the tip. It will take me awhile to wrap my head around that but will let you know what happens.
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 20th Mar 2008 15:14
Flat,

I put this in another thread as well. I think it was one of Ply's where you were discussing it. Place an entity, tire, battery, whatever in the map on your side, and throw it into the zone. I've made that work before, and I remember that a character wouldn't do it. There must be a difference to the engine.

Best.

Login to post a reply

Server time is: 2024-11-27 23:20:53
Your offset time is: 2024-11-27 23:20:53