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

Need help targeting player for trigger

Status
Not open for further replies.
Level 1
Joined
Jun 1, 2020
Messages
4
Hi,

I'm kinda new to WC editor and i'd need some help...

Capture.JPG


I want to introduce a auto-spawn system after certain upgrades.

It works that way, I'd simply like to apply this trigger to individual players, without having to create one for each color.

I've tried but failed, is it possible?
 
Last edited:
Level 28
Joined
Feb 18, 2014
Messages
3,579
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Variables --------
      • Set Region[1] = Base 1 <gen>
      • Set Region[2] = Base 2 <gen>
      • Set Region[3] = Base 3 <gen>
      • Set Region[4] = Base 4 <gen>
      • Set Region[5] = Base 5 <gen>
      • Set Region[6] = Base 6 <gen>
      • Set Region[7] = Base 7 <gen>
      • Set Region[8] = Base 8 <gen>
      • Set Region[9] = Base 9 <gen>
      • Set Region[10] = Base 10 <gen>
      • Set Region[11] = Base 11 <gen>
      • Set Region[12] = Base 12 <gen>
  • Auto Spawn
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Current research level of Swordmen Auto Spawn for (Picked player)) Equal to 1) and ((Number of living Swordman units owned by (Picked player)) Less than or equal to 4)
            • Then - Actions
              • Set Player_Index = (Player number of (Picked player))
              • Set SpawnPoint = (Center of Region[Player_Index])
              • Unit - Create 1 Swordman for (Picked player) at SpawnPoint facing 270.00 degrees
              • Custom script: call RemoveLocation (udg_SpawnPoint)
            • Else - Actions
 
Level 1
Joined
Jun 1, 2020
Messages
4
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Variables --------
      • Set Region[1] = Base 1 <gen>
      • Set Region[2] = Base 2 <gen>
      • Set Region[3] = Base 3 <gen>
      • Set Region[4] = Base 4 <gen>
      • Set Region[5] = Base 5 <gen>
      • Set Region[6] = Base 6 <gen>
      • Set Region[7] = Base 7 <gen>
      • Set Region[8] = Base 8 <gen>
      • Set Region[9] = Base 9 <gen>
      • Set Region[10] = Base 10 <gen>
      • Set Region[11] = Base 11 <gen>
      • Set Region[12] = Base 12 <gen>
  • Auto Spawn
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Current research level of Swordmen Auto Spawn for (Picked player)) Equal to 1) and ((Number of living Swordman units owned by (Picked player)) Less than or equal to 4)
            • Then - Actions
              • Set Player_Index = (Player number of (Picked player))
              • Set SpawnPoint = (Center of Region[Player_Index])
              • Unit - Create 1 Swordman for (Picked player) at SpawnPoint facing 270.00 degrees
              • Custom script: call RemoveLocation (udg_SpawnPoint)
            • Else - Actions


Cool thanks!

Two questioms; Else action by default will ignore the trigger or sould I define it?

what does the RemoveLocation refer to? Does it remove the region?
 
Status
Not open for further replies.
Top