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 / How to spawn trigger zones with other triggers?

Author
Message
Evil Robot
15
Years of Service
User Offline
Joined: 23rd Jan 2011
Location:
Posted: 28th Jan 2011 18:12 Edited at: 28th Jan 2011 21:19
How to spawn trigger zones with other triggers?

Letts say I have a trigger zone2 that I don’t necessarily want to activate the first time the player steps in to its area. The trigger zone2 will only be able to activate after certain conditions are met. That is after the player has activated another trigger1.

I thought this would be exactly as spawning of enemies but there is no such option, what I can see, in the trigger zone menu. So how should I do?

Appreciate any help
Dark Frager
16
Years of Service
User Offline
Joined: 16th Mar 2010
Location: The Void.
Posted: 28th Jan 2011 19:39
Set the first trigger zone's name to "(insert name here)"
Then set a second trigger zone and apply the script "plrinzoneactivateused.fpi" and in the "If Used" column write the name of the previous trigger zone. DONE. Every time you step in the second trigger, the first will trigger like you wanted. Hope this helped.

If you can see the enemy, they can see you.
Evil Robot
15
Years of Service
User Offline
Joined: 23rd Jan 2011
Location:
Posted: 28th Jan 2011 21:03
Hi thanks but that was not exactly what I meant. I don’t want the second trigger zone to activate when the player interacts with the first trigger. I just want the second trigger zone to spawn so that the next time the player enters that place something bad will happen
Dark Frager
16
Years of Service
User Offline
Joined: 16th Mar 2010
Location: The Void.
Posted: 28th Jan 2011 22:01
So you mean, First time you step in the trigger, nothing happens, but on the second time something activates?

If you can see the enemy, they can see you.
Thraxas
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 29th Jan 2011 00:23
Could you do this with variables. Set a global variable which is needed for the script in the trigger zone to run. Once you go into the second trigger zone have its script set the variable.

A man will one day wear a tophat in glasgow on a sunny day juggeling grapes while humming the jurrasic park theme tune.
Thraxas
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 29th Jan 2011 01:15 Edited at: 29th Jan 2011 01:20
Ok, I made a simple test for this. My scripting is not that great and there is probably a more efficient way of doing this.

I also added the level (with all stock models) so you could test it too.

The storage locker needs the setvariable.fpi.


The first trigger zone in the corridor needs the plrinzoneactivateusedHasEntered.fpi


the second trigger zone (the bigger one at the end of the room) needs the plrinzoneactivateusedSetHasEntered.fpi



You will walk through the first trigger zone and the enemies will not spawn. Once you go into the second trigger zone the gun will spawn and the first trigger zone will now activate the enemies when you walk through it.

edit:
I had put all those scripts in the scriptbank/user folder so if you put my map in your mapbank folder and the scripts in the scriptbank/user folder it should work without you having to edit anything.

A man will one day wear a tophat in glasgow on a sunny day juggeling grapes while humming the jurrasic park theme tune.
Evil Robot
15
Years of Service
User Offline
Joined: 23rd Jan 2011
Location:
Posted: 30th Jan 2011 00:26
Let’s put it straight I just want one trigger zone to spawn (not activate) a second trigger zone in the same manner as when spawning an enemy entity with a trigger zone.

But this is not possible because there is no option in the properties of a trigger zone that you can set to spawn at startno] and spawn after delayyes] as with entities.

Is there a way around this problem so I can get trigger zone 1 to spawn(not activate)trigger zone 2?
Thraxas
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 30th Jan 2011 02:04 Edited at: 30th Jan 2011 02:10
What difference does it make? What I showed does what you want just in a different way.

Edit: and someone else gave you a working solution. If neither is to your liking then you'll just have figure out your own way to do it as what you want is not possible!

A man will one day wear a tophat in glasgow on a sunny day juggeling grapes while humming the jurrasic park theme tune.
The Storyteller 01
17
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 30th Jan 2011 03:43 Edited at: 30th Jan 2011 03:46
Quote: "I don’t want the second trigger zone to activate when the player interacts with the first trigger. I just want the second trigger zone to spawn so that the next time the player enters that place something bad will happen ?"


I have toyed around with spawning/activating pain zones for the MP41 traps and honestly it worked all out with ACTIVATEIFUSED and DESTROYANDACTIVATE. And mostly I used entity-attached scripts to hurt player health instead of trigger zones.

As far as I understand your request what happens from the player's perspective is the following:
- player crosses through a special area and nothing happens
- player enters a distinctive space and the next time he crosses through the special area again, something bad happens.

There are numerous ways to achive this and I cannot imagine why it should only work with spawning a trigger zone.

Maybe you could just describe what exactly happens gameplay-wise, and then I am sure you'll get several solutions presented.

In case you find my grammar and spelling weird ---> native German speaker ^^
Gencheff
16
Years of Service
User Offline
Joined: 12th Jun 2010
Location: UK by way of USSR
Posted: 30th Jan 2011 15:48 Edited at: 30th Jan 2011 15:50
A trigger zone is just a placeholder for an entity with no bullet colission and visibility (with a few extra commands)...

With that said,your best option to get this to work is if you use an invisible object (entity) and make it dynamic with immobile=1 and also set in it's main script no bullet colission (nobulletcol=1 was the command I think)

Set it's spawn at start to NO and use the first trigger zone to spawn the invisible entity.

To make the entity actually do something , change it's Main script to a script of your preference.

This should work If I understood your request correctly.


PC Specs:Windows 7 Ultimate 64-bit,Intel Core i7 960 @ 3.20GHz,NVIDIA GeForce GTX 480,12GB RAM,2x Western Digital 997GB HDD

Login to post a reply

Server time is: 2026-07-01 09:29:17
Your offset time is: 2026-07-01 09:29:17