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 Proximety Door Problem

Author
Message
Blahguy
13
Years of Service
User Offline
Joined: 12th Dec 2010
Location: The Void
Posted: 28th Dec 2010 06:27
So I am working on having an entity (Colonel X) follow a waypoint that takes him to a door, with a main script that is looking for that entity, and when he is close, it should open, then close after Colonel X has walked away, continuing to follow his waypoint. I have the .fpi files in the zip folder here, or you could look at them here.

Here is the Main for Colonel X


Here is the Main for the door.

Attachments

Login to view attachments
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 28th Dec 2010 08:43
Your scripts don't seem to make sense. The Colon X script looks like it's trying to activate the door, but the door script doesn't have any code for dealing with activations.

Also, I don't think using "nearactivatable=0" will give the proper target, since it could very well be setting the target to some other entity that's not nearby.


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.
Blahguy
13
Years of Service
User Offline
Joined: 12th Dec 2010
Location: The Void
Posted: 28th Dec 2010 16:02 Edited at: 28th Dec 2010 16:04
I suppose maybe some clarification is in order?

My goal is for the door to detect that Colonel X is near the door, and therefore open, and close when the Colonel X is x distance away from the door.

Also, what's happening now is that once the player spawns, the door is just opening and closing, then when Colonel X gets near the door closes and stops, then begins to open and close again when Colonel X is right next to the door.
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 28th Dec 2010 17:22 Edited at: 28th Dec 2010 17:23
Q: Are there to be any other entities that will be moving around the area of the
door?

Blahguy
13
Years of Service
User Offline
Joined: 12th Dec 2010
Location: The Void
Posted: 28th Dec 2010 18:16
To Seth Black: No. There will not be. The closest entity will be walking 2 squares south of the door.
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 28th Dec 2010 18:58 Edited at: 28th Dec 2010 19:03
...you could use a triggerzone that incorporates this logic

:state=0,entitywithinzone=1:activateifused=1

to have Colonel X activate the door, which is designated in his
IFUSED field, when he approaches the area near the door.

Colonel X not being in the area near the door could also cause the door to
be closed, by extending the same logic backwards.

You'll have to examine existing triggerzone and door scripts as a base for
your custom script, but it's very plausible.

Login to post a reply

Server time is: 2024-11-24 14:38:46
Your offset time is: 2024-11-24 14:38:46