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

[Trigger] Spawning

Status
Not open for further replies.
Level 5
Joined
Jun 27, 2009
Messages
137
Hello. I'm having problems setting units to spawn at buildings. This is how I set up the triggers in my map. This is how I have it set up:
l_c30a306f4c5f464689a23962864d248a.jpg


Not sure if I did that right, but be sure to yell at me if I didn't.
 
Level 5
Joined
Jun 27, 2009
Messages
137
Well, here's try number two then.
  • Set NumSpawners = 61
  • -------- Redone Spawning system array based --------
  • -------- Note that 'frequency' controls how often the monster spawns. --------
  • -------- 1 frequency is 0.5 seconds. 4 frequency is 2 seconds. 8 frequency is 4 seconds --------
  • -------- By default it is 4 (2 seconds) --------
  • For each (Integer A) from 0 to NumSpawners, do (Set Frequencies[(Integer A)] = 8)
  • For each (Integer A) from 0 to NumSpawners, do (Set MaxMonsters[(Integer A)] = 7)
  • For each (Integer A) from 0 to NumSpawners, do (Set EnableSpawners[(Integer A)] = True)
  • Set MonsterSpawners[0] = Arcane Tower 0023 <gen>
  • Set SpawnTypes[0] = Spirit Swordsman
  • Set EnableSpawners[0] = False
How is this?
 
Level 4
Joined
Mar 23, 2008
Messages
87
Why do you set EnableSpawners to false for each integer after you've just run a loop which sets them all to true first?

You need to give us more information if we're to solve your problem. Attach your map maybe?
 
Last edited:
Level 5
Joined
Jun 27, 2009
Messages
137
Why do you set EnableSpawners to false for each integer after you've just run a loop which sets them all to true first?

You need to give us more information if we're to solve your problem. Attach your map maybe?

That's all there really is in the trigger. All that's left is just those same commands repeated. I have the EnableSpawners set to false, because I copied this trigger from a map that a friend of mine made, because I didn't know how to set spawns at buildings. If someone could just tell me how to do that, like I originally asked, that would be awesome.
 
Level 4
Joined
Mar 23, 2008
Messages
87
Where are your Unit - Create unit actions by the way?
@Pharaoh: I don't think he knows what that is.
@Thfatman: I think you should ask your friend for help since he has made the triggers and knows how they work. If not then you should experiment atleast a little with making your own triggers or follow a tutorial.
eg: Creep Respawn (GUI)
You need atleast this basic knowledge to understand what we're talking about and to be able to customize it to your needs.
Alternatively you could attach your map and request changes made to it (not what i would recommend)
 
Level 5
Joined
Jun 27, 2009
Messages
137
@Thfatman: I think you should ask your friend for help since he has made the triggers and knows how they work. If not then you should experiment atleast a little with making your own triggers or follow a tutorial.
eg: Creep Respawn (GUI)
You need atleast this basic knowledge to understand what we're talking about and to be able to customize it to your needs.
Alternatively you could attach your map and request changes made to it (not what i would recommend)

Okay, look. I just want to set units to spawn AT a building. I know how to set unit spawns, and spawn times. I want them to spawn at a certain building, and stop when the building is destroyed.
 
Level 3
Joined
Dec 6, 2005
Messages
67
not going to try reading that tiny image lol but my suggestion is something like
  • Trigger1
  • Events
    • Time - Every 5.00 seconds of game time
  • Conditions
  • Actions
    • Unit - Create 1 Footman for Player 1 (Red) at (Position of (Barracks)) facing Default building facing degrees
  • Trigger2
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Barracks
  • Actions
    • Trigger - Turn off (Trigger1)
 
Level 7
Joined
Mar 8, 2009
Messages
360
  • bla
    • Events
      • Time - Every 20.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Barracks)) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Footman for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees
try to understand everything of this (its not that hard) and when you do read this because this trigger leaks locations and a unit group.
 
Well yes, what we were saying is that you don't only need to set the spawns in variables, you need to use this action too:
  • Actions
    • For each (Integer A) from 0 to 8, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • ((MonsterSpawners[(IntegerA)]) is alive) Equal to True
          • Then - Actions
            • Set Point1 = (Position of (MonsterSpawners[(IntegerA)]))
            • Unit - Create 1 SpawnTypes[(IntegerA)] for (Your player) at Point1 facing default building degrees
            • Custom script: call RemoveLocation (udg_Point1)
 
Level 5
Joined
Jun 27, 2009
Messages
137
I repeat:
try to understand everything of this (its not that hard)

JUST USE YOUR BRAINS
((MonsterSpawners[(IntegerA)]) is alive) Equal to True
What do you think this condition does?

Oh, I'm so sorry masta. I guess just me wanting to clarify with ya means that I's just so stupid. Me sorry.
 
Status
Not open for further replies.
Top