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

Help fast

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
How can I make this hero is created for the player who double clicks it?
plz respond fast :=)

  • Ghost Lord
    • Events
      • Unit - Ghost Lord 0069 <gen> Is selected
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroBoolean[1] Equal to True
        • Then - Actions
          • Set ReturnFromMission = (Center of Return from Mission <gen>)
          • Unit - Create 1 (Unit-type of (Triggering unit)) for (Triggering player) at ReturnFromMission facing 360.00 degrees
          • Unit - Remove Ghost Lord 0069 <gen> from the game
          • Custom script: call RemoveLocation(udg_ReturnFromMission)
        • Else - Actions
          • Set HeroBoolean[1] = True
This doenst works btw..
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
  • GIEF
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Red Dragon 0001 <gen>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • bool Equal to True
        • Then - Actions
          • Unit - Change ownership of Red Dragon 0001 <gen> to Player 1 (Red) and Change color
        • Else - Actions
          • Set bool = True
Works.
 
Level 18
Joined
May 11, 2012
Messages
2,103
Can I do like this?

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
    • Conditions
    • Actions
and then if any of those players select the hero, it will be created for him?
 
Level 18
Joined
May 11, 2012
Messages
2,103
I got like this:

  • Ghost Lord
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Ghost Lord 0069 <gen>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroBoolean[1] Equal to True
        • Then - Actions
          • Set ReturnFromMission = (Center of Return from Mission <gen>)
          • Unit - Create 1 (Unit-type of (Triggering unit)) for (Triggering player) at ReturnFromMission facing 360.00 degrees
          • Unit - Change ownership of (Last created unit) to Player 1 (Red) and Change color
          • Item - Create |cFFFFFF00Ankh of Reincarnation at (Center of (Playable map area))
          • Hero - Give (Last created item) to (Last created unit)
          • Item - Create |cFFFFFF00Potion of Healing at (Center of (Playable map area))
          • Hero - Give (Last created item) to (Last created unit)
          • Item - Create |cFFFFFF00Potion of Mana at (Center of (Playable map area))
          • Hero - Give (Last created item) to (Last created unit)
          • Unit - Remove Ghost Lord 0069 <gen> from the game
          • Custom script: call RemoveLocation(udg_ReturnFromMission)
        • Else - Actions
          • Set HeroBoolean[1] = True
Unit - Change ownership of (Last created unit) to Player 1 (Red) and Change color

this is what i dont want to be like it is
 
Level 18
Joined
May 11, 2012
Messages
2,103
repeating: Unit - Change ownership of (Last created unit) to Player 1 (Red) and Change color

this is what i dont want to be like it is, I want it to chnge ownership to the player WHO picked that hero, not to play player 1...
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
  • GIEF
    • Events
      • Player - Player 1 (Red) Selects a unit
    • Conditions
      • (Triggering unit) Equal to Red Dragon 0001 <gen>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • bool Equal to True
        • Then - Actions
          • Unit - Change ownership of Red Dragon 0001 <gen> to (Triggering player) and Change color
        • Else - Actions
          • Set bool = True
Triggering player works fine.

If you're creating the unit for the triggering player, there's no reason for you to do Unit - Change owner
 
Status
Not open for further replies.
Top