• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

"Castle-based" spawns

Status
Not open for further replies.
Level 4
Joined
Mar 20, 2010
Messages
107
Hey, im making a tactical map in World Editor, and need some help with the triggering. As the title says, i need to make a trigger that increases the number of units that spawns, depending on the number of castles I own. Simular to Battle for Middle Earth maps, really.
So when I build a castle, I get 2 more footmen, for example.

Also planing on making 3 different castles:
One for melee
One for ranged
And one for cavalry.
So the different castles will increase the spawns differently. Will that make the triggers different?
(And it might look kinda messy, not so good on explaining ;) )

Would appreciate all help I can get
Thanks for your time and patience,
 
  • Trigger
  • Events
    • Time - Every 10.00 seconds of game-time
  • Conditions
  • Actions
    • Set BaseAmount = 4 //This is the basic footman spawn; they are by default 4.
    • PlayerGroup - Pick every player in (All players) and do (Actions)
      • Loop - Actions
        • Set NormalAmount = (BaseAmount + (Number of living Castle owned by (Picked player)))
        • Set Point1 = ((Picked player)'s Start Location)
        • For each (IntegerA) from 1 to NormalAmount, do (Actions)
          • Loop - Actions
            • Unit - Create 1 Footman for (Picked player) at Point1 facing default building degrees
        • Custom script: call RemoveLocation (udg_Point1)
Something like this?
 
Level 4
Joined
Mar 20, 2010
Messages
107
Hm, yeah. I think so..
That will make it possible to get increased spawns when building castles, right?
And I can just change the footman to archers or cavalry to make different spawns?
But yeah, thanks for the help.
 
Level 4
Joined
Mar 20, 2010
Messages
107
Ah, right. That solved some things :p Thanks for responding so quickly XD Now im off to eat desert, then back on to see if I can make it work propertly ;)
 
Level 4
Joined
Mar 20, 2010
Messages
107
... 1 more question :p How to make that custom script? Hey, I know! Imma newbie ^^ Atleast I know that it is for removing the leaking stuff from the trigger :p
 
Status
Not open for further replies.
Top