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

Footmen - Spawning

Status
Not open for further replies.
Level 25
Joined
Dec 30, 2007
Messages
1,549
Hey!

Yesterday I decided to make my first seriouse map.
I choose a Footmen, because it's kinda easy and
I've always wanted to balance the other crappy versions of Footmen

I'm not new to the WE, but I'm not a good "Trigger"
so here's my porblem:

I've made a simple system to spawn "Footmens".

  • Spawn Footmen
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • -------- Tier Zero = Footman --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of living Tier Zero units owned by (Picked player)) Equal to 1
            • Then - Actions
              • Unit - Create 1 Footman for (Picked player) at ((Picked player) start location) facing Default building facing degrees
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of living Town Hall units owned by (Picked player)) Equal to 1
                • Then - Actions
                  • Unit - Create 2 Militia for (Picked player) at ((Picked player) start location) facing Default building facing degrees
                • Else - Actions
Im not good at this, so there's probably a "fail" somewhere.

But to the problem:
When I play this with 1 computer, it works fine (Red=Me and Blue=Comp)
the units spawns and so on.

But when I add Teal as a Computer, the units doesn't spawn :cry:
So the question is simple, what's wrong?

Update:
Solved
 
Last edited:
Level 3
Joined
Sep 11, 2004
Messages
63
the condition is as weird as it could be, probably it never evaluated as true, try putting a display text to player/force in donothing branch to see if it always hits that branch.
 
The condition is a fail. Sorry.
Try this:
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Action
      • Set Point1 = ((Picked Player)'s Start Location)
      • Set Temp_Group = (Units owned by (Picked Player))
      • Set Region1 = (Region centered at Point1 with size (150.00, 150.00))
      • Unit Group - Pick up every unit in (Temp_Group) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Region1 contains (Picked unit)) Equal to True
            • Then - Actions
              • Unit - Create 1 Footman for (Picked player) at (Point1) facing Default building facing degrees
            • Else - Actions
      • Custom script: call DestroyGroup (udg_Temp_Group)
      • Custom script: call RemoveLocation (udg_Point1)
      • Custom script: call RemoveRect (udg_Region1)
 
Status
Not open for further replies.
Top