• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Best way to make this type of trigger

Status
Not open for further replies.
Level 4
Joined
Aug 12, 2014
Messages
48
I am stuck on a trigger/situation, that I am not sure how to fix. I have tried various ways / triggers but nothing is working how I would like.

Context:
Payer A and Player B (enemy) each have an area that can only be accessed via a warp trigger from region 1 to region 2, etc. Inside of the base, the player builds their units / buildings etc and outside of it is the main map. Now, on the outside Player A has a super tower to defend the "entrance" ( warp into base trigger) which leads me to the problem.

How do I make it so Player A can still move in and out of the warp freely but player B can not until the tower is dead?

To make it more complex, the tower is actually built from an invulnerable unit that upgrades to the tower. When the tower is killed, it is replaced by the invulnerable unit so that it can be rebuilt again later.

Any thoughts or ideas are appreciated.
 
Level 15
Joined
Aug 7, 2013
Messages
1,337
Someone asked a very similar question before hand. Let me try to find the thread (it was about a Hero Arena and making it so the enemy team can't enter the other team's item / healing area).

In any case create a trigger specifically for the enemy team that does the enter region event / warp movement.

When a player builds one of these towers, disable that trigger so they can no longer enter.

When one of these towers dies, reenable that trigger so the enemy can enter again.

You'll need an enter region trigger for each team for each entrance, and also to store each trigger in a global variable so you can disable / enable it.

By default I am guessing it is disabled, since players start with the tower? Or if not then by default keep it enabled.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
To make it more complex, the tower is actually built from an invulnerable unit that upgrades to the tower. When the tower is killed, it is replaced by the invulnerable unit so that it can be rebuilt again later.
You mean that the unit IS the Building ?
When the Building is created, the unit turns to that Building, and when it is destroyed, it will be revived at the same location of that building and has the ability to create the building again ?
 
Status
Not open for further replies.
Top