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

How to change owner of all naga creeps to player?

Status
Not open for further replies.
Level 4
Joined
Jul 12, 2011
Messages
67
Hi! I was wondering how I should trigger that.

When a specific building dies, the players becomes naga and I want all still-existing Naga Creeps to change owner to that player at the same time. How exactly would I do this?

I have naga creeps all over the huge map, so I'd rather not create a bunch of regions, I was wondering if there was some better way to do this? Thank you for your help!

(Ex: I want all Mymidons, Sirens, etc on the map to change owner to Player2)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
In the OE change the race of those "Naga" to "Demon". Then pick every unit in Playable map Area matching (Race of Matching Unit = Demon) and transfer the ownership to the player you want.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
Ow well you're soultion is quite simple, but because I already done it, here is triggered version of that
It should be MPI and leakless
For now you won't get control over those Nagas(I only chose Sirens and Mymidons but you can add more to condition) because you have one farm at North-West but you can change owner of that and you will than receive control over those nagas
however Spartipilo's method is very faster :D
 

Attachments

  • changeunits.w3x
    19 KB · Views: 37
Level 20
Joined
Jul 14, 2011
Messages
3,213
Depends on the amount of Naga units you have. You can do it with the Unit-Type Id or with the race, as I did. You can also assign those nagas to a player (Player 12) and just compare "If unit belongs to player 12, give control of player 12 units to killing player" or whatever you want.
 
Level 16
Joined
May 2, 2011
Messages
1,345
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Mur'gul Reavr
          • and list the units
    • Then - Actions
      • Unit Group - Add (Triggering unit) to temp_g
      • change owner here
    • Else - Actions
this works right? I mean when you pick all units in map, and this if action in it, selecting the Naga units
 
Status
Not open for further replies.
Top