• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Time Based Spawn Trigger

Status
Not open for further replies.
Level 3
Joined
Mar 25, 2011
Messages
50
Hello, I'm in need of some help to make a trigger like my description in the title.

Essentially I have a game clock, counts UP to 50seconds, then resets.

I also have buildings (plural is KEY) that sell unit spawns. So what I'm working for is that when a player purchases a selected unit spawn, it will spawn that unit every time the clock resets. However I would like the units to spawn at the rally point of the building.

Also, If there is a way for me to automatically have 1 spawn of a certain kind of unit(almost different from every base) to be there permanetely. In other words when the game starts, each base has a unit spawn already purchased.

Triggers are my weak spot, and I dont fully understand variables no matter how much I read those guides. So any kind of help here, partial or full regarding the trigger would be very much appreciated. Thanks.
 
Level 3
Joined
Mar 25, 2011
Messages
50
@ Marcos, I have no idea what I'm suppose to do there and how to modify it. Thanks for the help nonetheless.

@Defskull Very close. However I probably did forget to mention a few important details. So in the simplest and most understandign way possible I'll describe my layout.

First I have about 36 different bases, selling different kinds of units. When a player purchases a unit(aka a spawn), the base will start spawning that unit after it has completed training every time my game clock resets.

Also it needs to only stop spawning that unit when the base is destroyed. I wont worry about where they spawn atm, right next to the building is fine.

If you're still interested in helping me, could you also please tell me what your variables are categorized under? (like trigger, boolean, timer window, timer etc.) that would help a lot.

Eitherway your practice map was somewhat useful in a few ways :)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I remade the test map a bit
No more AI in that map (for easier testing)
Remember, if you already has built a Barrack A, you can't build it one more time because you said it yourself, each building in your map has its own spawning unit (each building differs from one another)
So, each building spawns a unique 1-type of unit only
Because, if you had trained a Footman, you can't train it again because I have disabled its training by trigger
So, you should only build 1 building for 1 type of unit only
In my new test map, just build 1 building for 1 type only:
1 Footman's Field
1 Knight's Hall
1 Sniper's Shooting
 

Attachments

  • Simple Building Auto Create Unit System.w3x
    15.6 KB · Views: 28
Level 3
Joined
Mar 25, 2011
Messages
50
Thanks defskull, It's pretty close.

Just a few things though:

1. I can set it to sync up with a timer/clock right? Like instead of 10 seconds they spawn, they will spawn when the timer reaches 0.

2. Will I have to go though the Building Loop trigger to add every unit/building to the list of conditions? Or is there a better way? Because that seems pretty tedious.

3. Also I should let you know that my buildings offer 3-6 different kinds of units. But in a race they may share 1-2 of the same unit (2 buildings may sell the same kind of unit but no buildings sell EXACTLY the same range of units.)
Example:
I have a Castle and a Townhall.
Castle sells knights, rifleman, and footman. While the townhall sells rifleman, footman, and priests.

One more thing, I would like to make it possible for you to purchase multiple #s of the same spawn. So like you could have 2 rifleman spawn every X seconds, that kind of thing.

If you would like to edit it again, or just advise me how to change a few things, or a combination of both, that would be appreciated.

P.s. Although it means little imo I have rep'd you for atleast going this far :)
 
Status
Not open for further replies.
Top