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 / triggering an open door using a character

Author
Message
MarkSA
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location: DownUnder
Posted: 13th Feb 2010 08:37
I would like some help with something I am trying to do.

I am trying to get a character to trigger off an event. The character

would trigger a closed door, So it would open when the

character(enemy) hit the trigger zone.

Is this possible, I have already searched and didn't come up with

enough info to amke it happen.

Failing that, If I say, shot a light, the door would open?

Thanks
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 13th Feb 2010 09:24
You can make use of the anywithinzone condition to check if there is an entity within it. Then just do the standard procedure of opening the door.


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
MarkSA
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location: DownUnder
Posted: 13th Feb 2010 09:46
Thanks, I tried that with no luck. But just to be sure I would appreciate a walkthrough, just to make sure I haven't missed something
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 13th Feb 2010 10:05
Add this script to the main section of a trigger zone:

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

Then, under the IfUsed settings in the trigger zone, type 'dooropen'. Then place the door you want to open, and rename it 'dooropen'. Set it's main script to doorremote.fpi. That should work.


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
MarkSA
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location: DownUnder
Posted: 14th Feb 2010 04:42
Thanks for your help Marc.

It sort of works. The door is opened even before the entity has triggered anything.

Not going so well with FPSC. I seemto find more issues with the program.
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 14th Feb 2010 13:16
I guess when you place the trigger zone you have to make sure that there's no dynamic entities in it. Otherwise you'd have to look into the anywithinzone command.


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 16th Feb 2010 02:49
I do believe characters are capable of activating nearby entities. This is how they open doors and whatnot.

Perhaps you could use the same idea behind that to have your entity activate a nearby entity (instead of a triggerzone) that would then activate the door.


That's my two cents.


The one and only,


MarkSA
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location: DownUnder
Posted: 16th Feb 2010 03:02
That's a good idea Plystire.

Could you give me a rundown on how I would go about it?

Thanks
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 16th Feb 2010 03:10
Rundown:

- Open up a character script (one that follows waypoints) and look for the command that lets them activate the entities nearby, because I forgot what the command is.

- Place a small entity on the floor, or wall where you want the activation to take place (basically, where you had your triggerzone before)

- Script that entity something like so:


- Also, give that entity's "If Used" the name of your door

- Rescript your wandering entity to use the command that you got from the character script, and have it use an activation value of 2.



Should work.. I obviously haven't tested it. But it makes sense in my head.


The one and only,


Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 16th Feb 2010 03:53
Good work Plystire, I hadn't even thought of doing it that way


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21

Login to post a reply

Server time is: 2024-11-25 02:30:58
Your offset time is: 2024-11-25 02:30:58