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

[HELP] Changing Ownership!

Status
Not open for further replies.
Level 22
Joined
Feb 4, 2005
Messages
3,971
  • Melee Initialization
    • Events
      • Unit - Any Unit Life changes
    • Local Variables
    • Conditions
    • Actions
      • Unit - Change ownership of (Triggering unit) to player (Owner of (Attacking Unit)) and Change Color
player(owner of attacking unit) you should replace attacking with whatever unit will determine that it is that player to whom you change ownership
 
  • Melee Initialization
    • Events
      • Unit - Any Unit Life changes
    • Local Variables
    • Conditions
    • Actions
      • Unit - Change ownership of (Triggering unit) to player (Owner of (Attacking Unit)) and Change Color

All this will do is make it so as soon as the target gets attacked, it changes right away. I want it to change at, say, 100 hp remaining.
 
Put a condition?

Tried that..

Can you not read the sticky...

Anyway you basically do it the same way as you did in WC3 except the natives are slightly different and players are now integers and not a separate object type.

I'm not that experienced with the terms used..
Can I have a screenshot for dummies? xD

Still need help with this. Bump.
 
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,206
  • Your trigger
    • Events
      • Unit - Any Unit takes Fatal or Non-Fatal Any damage (from Any effects)
    • Local Variables
      • Damaged Unit = (Triggering unit) <Unit>
    • Conditions
      • (Unit type of Damaged Unit) == Command Center
      • (Damaged Unit Life (Current)) <= 100.0
    • Actions
      • Unit - Turn Damaged Unit Invulnerable state On
      • Unit - Change ownership of Damaged Unit to player (Damaging player) and Change Color
      • Unit - Set Damaged Unit Life (Percent) to 100.0
      • General - Wait 5.0 Game Time seconds
      • Unit - Turn Damaged Unit Invulnerable state Off
Sigh...
 
Status
Not open for further replies.
Top