• 🏆 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!

AoS unit type spawning

Status
Not open for further replies.
Level 4
Joined
Jan 19, 2015
Messages
61
i want to know how to do this, please if someone know how (better with a video/post) help me please.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Like the heroes or minions?

For minions make a looping timer and create a unit and order it to attack move to the enemy (could be in more steps to make a route instead of shortest route)

For heroes it will get complicated if you want to support different pick modes.
 
Level 4
Joined
Jan 19, 2015
Messages
61
Like the heroes or minions?

For minions make a looping timer and create a unit and order it to attack move to the enemy (could be in more steps to make a route instead of shortest route)

For heroes it will get complicated if you want to support different pick modes.


For minions, im new on this so i dont understand you very well xD
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Well first of all you have to create a path.
The most simple path is a straight path from base 1 to base 2.
So you want the minions from base 1 to attack-move towards base 2.

Other paths could be made of multiple paths. Like from base 1 to top. From top to base 2.
That way they will first go to top and then to base 2.
But that will come later.

You have to have a moment in the game when you tell the system to start the game. (Start spawning minions, start generating gold, start timers for creeps, etc.)
At that moment you create a timer.
That timer will last... lets say 30 seconds.
  • Countdown Timer - Start Minion_Timer as a Repeating timer that will expire in 30.00 seconds
Where Minion_Timer is a timer variable.

Then you create a trigger:
  • Minions
    • Events
      • Time - Minion_Timer expires
That is the moment when the minions should be created.
Then you can put your minion creation code there.
I use building that recruit units with a 1 second recruiting time.
Other people use "Create (integer) units of type (unit-type) at (point)"
Other people use other methods but those two are the first to come to my mind.
I use players 1-5 as players for left side and players 6-10 for players of right side.
Then I use player 11 for minions and structures for left and 12 for right.
  • Minions
    • Events
      • Time - Minion_Timer expires
    • Conditions
    • Actions
      • Unit - Create 5 Footman for Player 11 (Dark Green) at (Center of Base 1 <gen>) facing Default building facing degrees
      • Unit - Create 5 Footman for Player 12 (Brown) at (Center of Base 2 <gen>) facing Default building facing degrees
Now you have 2 regions "Base 1" and "Base 2"
When a unit owned by "Player of left" enters Base 1, then that unit is issued to attack-move to Base 2.
  • Minion Order Middle Lane
    • Events
      • Unit - A unit enters Base 1 <gen>
      • Unit - A unit enters Base 2 <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
        • Then - Actions
          • Unit - Order (Triggering unit) to Attack-Move To (Center of Base 2 <gen>)
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
        • Then - Actions
          • Unit - Order (Triggering unit) to Attack-Move To (Center of Base 1 <gen>)
          • Skip remaining actions
        • Else - Actions
Now every 30 seconds since the game started, you have 5 footman for both sides.

When you want to have other routes, you have to create more smaller groups.
Like as I said before, from base 1 to top and then from top to base 2.
From base 2 to top and then from top to base 1.
All require a trigger and a region (because the enters a region event is the most simple one to use)

I created these triggers just now so I might have forgotten something though.
Also be sure to save the locations in a variable and set those on map initialization.
Your triggers will look more like this now:

  • Initialize region locations
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Base_1_Location = (Center of Base 1 <gen>)
      • Set Base_2_Location = (Center of Base 2 <gen>)
  • Minion Order Middle Lane
    • Events
      • Unit - A unit enters Base 1 <gen>
      • Unit - A unit enters Base 2 <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
        • Then - Actions
          • Unit - Order (Triggering unit) to Attack-Move To Base_2_Location
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
        • Then - Actions
          • Unit - Order (Triggering unit) to Attack-Move To Base_1_Location
          • Skip remaining actions
        • Else - Actions
That is better than create and destroy a new variable every time a unit enters a region.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I dont understand the first part :(
At the map initialization, the match did not start yet.
Because players have to pick their hero in-game.
And they should have the time to choose carefully so the "match" has not started even though the "game" has.

When the last player has picked his hero, the match starts.
Then you create a timer that runs every 30 seconds that will spawn minions.
You also create a timer that runs every 1 second that will give the players base gold.
You also create timers for neutral monsters to spawn.
Etc etc etc.

That should be helpfull... I suppose.
 
Level 4
Joined
Jan 19, 2015
Messages
61
Sorry for late answer, i dont want heroes its only the minion type spawning, isnt an AOS map xD only need the minion type spawning so, yeah sorry for lossing some of your time with heroes things.
 
Level 30
Joined
Jan 31, 2010
Messages
3,551
I've extracted the system from my old AoS map I stopped developing long time ago, so here you go.

It's fully functional, customizable, leakless (meaning it won't cause lag) and I've wrote some comments to explain what is what.

The system features: Spawning creeps, ordering them to move, upgrading creeps, upgrading creep counts. It's easy to modify it all. Have fun :)

I wanted to let Wietlol explain this to you, but seeing you don't have too much experience, I've took the liberty to pop in.
 

Attachments

  • AoS Creep System.w3x
    20 KB · Views: 50
Level 4
Joined
Jan 19, 2015
Messages
61
Thank you, i have much experience but not with tiggers, i have been making melee maps for me and my brothers since i was a kid :)
 
Status
Not open for further replies.
Top