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 / Is it possible to trigger trigger zones?

Author
Message
Zay
16
Years of Service
User Offline
Joined: 2nd Dec 2009
Location: sLOVEina
Posted: 5th Aug 2010 11:56 Edited at: 5th Aug 2010 11:57
This has been bugging me for quite some time now.
Is it possible to set a trigger zone,so that when the player step in, it triggers (makes it appear) another trigger zone,which is the main one.This could be needed for many possible things.Example,you go into a room,you got to a dead end (where the first trigger is) and when you go back to the exit an enemy appears (because the main trigger (which wasn't there before) got triggered,because another trigger triggered it which triggered an enemy) ....eerrr...right.
So anyway is it possible?

Contact me in Skype,name- nejcplan
Cyborg ART
19
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 5th Aug 2010 12:15
I have no idea since you cant set the triggerzone to not spwan at start.

But Try using a invinsible box with no collision, set the mainscript to playerinzone or something.

TerrorNation
16
Years of Service
User Offline
Joined: 18th Dec 2009
Location:
Posted: 5th Aug 2010 13:46 Edited at: 5th Aug 2010 13:48
Well you could write a script for each trigger zone so that the:

Main trigger zone only works when the player enters it AND;
That the first zone must have been entered first:

First trigger zone will activate the Master trigger zone (if you will) via scripting i.e. :



Then put the enemy's name in the If Used box of the Master Zone and make this the main for the Master Trigger:



I hope this works
Marc Steene
FPSC Master
20
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 5th Aug 2010 13:53
I would do this using variables. Set a variable to 1 when entering the first zone, and add a check to the second trigger zone to see whether the player has entered the other zone or not.


[b]FPSC MIGRATION: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
TerrorNation
16
Years of Service
User Offline
Joined: 18th Dec 2009
Location:
Posted: 5th Aug 2010 13:57
Variables would work fine. Should I change it to variables or what?
ctm
21
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 5th Aug 2010 14:52 Edited at: 5th Aug 2010 14:58
huh...why that complicated?

You can change the name of a TriggerZone like at any other entity.
So you can trigger a TriggerZone like any other entity by using the IFUSED field of the TriggerZone that triggers a other TriggerZone.

Example:

TriggerZone 1:
Name: Trigger Zone
IFUSED field: TZ2
Script: plrinzoneactivateused.fpi

TriggerZone 2:
Name: TZ2
IFUSED field: TriggEnt
Script:same sript as above + one activated=1 condition:


Any Entity which gets activated by TriggerZone 2:
Name: TriggEnt
IFUSED field: <empty>
Script: A script that waits for activation (like a remotedoor) or just a entity which is set to Spawn at Start = 0 (endless possibilities)
TerrorNation
16
Years of Service
User Offline
Joined: 18th Dec 2009
Location:
Posted: 5th Aug 2010 15:09
That's exactly what I did ctm, so it's not complicated

I just do it that way myself and I used settargetname=x instead of activateifused=x . It still works either way.
SpyDaniel
20
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 5th Aug 2010 15:53
You could make the trigger zone spawn an entity that has collision turned off and is invisible (transparent texture). Give this entity a script so that when the player is within a certain range of it, trigger what you want to happen in the script.

Windows 7 Home Premium 64-bit, AMD Phenom II X4 940 3.0Ghz, 2.0GB Single-Channel DDR2 @ 400MHz, ATI Radeon Sapphire HD 5770 Vapor-X
Zay
16
Years of Service
User Offline
Joined: 2nd Dec 2009
Location: sLOVEina
Posted: 5th Aug 2010 18:03
Wow I think my head will explode,thanks for all the help.
I think I'll try ctm's advice first.

Contact me in Skype,name- nejcplan
TerrorNation
16
Years of Service
User Offline
Joined: 18th Dec 2009
Location:
Posted: 5th Aug 2010 21:14
I think ctm's advice is the best because it requires the least work compared to my cluttered thinking
ctm
21
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 6th Aug 2010 02:49
Your way to do that is absolutely ok.
For a scripting beginner it may be more easy to set the reference in the IFUSED field because it can be done in the editor.
Also it's more easy to check what entity gets "triggert" because you can see it in the editor properties and you don't have to use special scripts for the trigger events.

There is no right or wrong way. If it works it's ok.
PW Productions
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 7th Aug 2010 07:42
I had this same question, here was the thread. Read through it, scroll down and there are a few scripts you can use. It's very easy to understand.


If something is perfect, it probably doesn't work. -PWP

Login to post a reply

Server time is: 2026-07-05 00:42:50
Your offset time is: 2026-07-05 00:42:50