• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Reinforcements Trigger. (I don't have a clue)

Status
Not open for further replies.
Level 4
Joined
Jan 23, 2014
Messages
53
So I am working on a trigger/event for my Warcraft III map. I have no clue however, to make it work. The event involves a player to have an off-map (in a corner of the map or something along those lines, and the player can spawn groups of soldiers from it. There's a timer that goes along with that on it's own time. I want to have it that they can purchase as many groups as they want at any time, and when the timer goes off (as it would normally) then they get reinforcements just in front of their main building. Does anyone have an idea of how it would work? I know i'd just keep the timer on repeat every 1-2 minutes and presumably I would trigger it so that when it ends, the groups of units spawn, I just don't know how to make it work. (Do note, want to have it so that the units don't spawn every time. Just once and then no more unless they buy the group again.) If anyone can help, that would be much appreciated. Thanks in advance!
 
Level 4
Joined
Jan 23, 2014
Messages
53
So yeah. I get your drift for the most part. Basically I'm going to have it work like a player-customized tavern (with unit groups instead.) and it'll work basically like a representation, x # of units is equal to y bought from tavern.

I honestly don't know how to work the trigger for the timer. Here's how I have it set up.
  • Reinforcement Trigger
  • Map Initialization
  • Conditions: None
  • Actions: Start Timer as a Repeating timer that will expire in 120.00 seconds
I think there should be a condition such as a map initialization, however, seeing as this is my first attempt at actually triggering, I cannot find it.
 
Hm actually forget the ability thingy, because that way the player can't directly see how many groups he bought.

Instead have the building produce dummy units which only serves as representations of unit groups.
Fx. the building can train a Footman. But the Footman is only produced so the player can see that a Footman unit group is coming as reinforcements the next time the timer hits 0.
Everytime the player buys a Footman a new Footman unit group will spawn.


On the periodic trigger part.
You can either use a periodic event or a timer. Use whatever floats your boat.

For the example I will use a periodic event.

Events - Every 120 seconds of game time
Conditions -
Actions -
-Set Temp_Unit_Group = Pick all unit in Spawning_Region
-For every Temp_Integer_01 from 1 to number of Footman in Temp_Unit_Group do actions
-Loop
-Create X Footman at Your_Location for Some_Player
-----------------------------------------------------
-For every Temp_Integer_02 from 1 to number of Rifleman in Temp_Unit_Group do actions
-Loop
-Create X Rifleman at Your_Location for Some_Player


When done destroy the Temp_Unit_Group so it doesn't leak.


I'm not completely sure this is what you want. But this is how I understood your problem.

Edit: Clarifications.
-Temp_Unit_Group is a Unit Group variable
-Temp_Integer_01/02 are Integer variables
-Your_Location is a Point variable and should point to where you want the unit group to spawn (remember to remove the point again so it doesn't leak)
-Some_Player is the player who the unit groups are created for
-Create X Footman I wrote X because I understood it so the player should have a whole group spawning per Footman trained by the building.
 
Level 4
Joined
Jan 23, 2014
Messages
53
Thanks. I did probably sound wrong, but I did mean that I would have it work like the Blood Tournament (A wonderful game by the way) however, instead of building it with a worker and staying, it would be built by the 'Tavern' and once the timer went off, the group would spawn and the location and unit would be removed until the user bought another.

Edit: I've made both the Footman's respective reinforcement unit to be built within the 'tavern' however, when I look for both of them, they're nowhere to be found unless it's inside the unit editor. They're in Custom and I have them both set to Human. Is there something i'm missing?
 
Last edited:
Status
Not open for further replies.
Top