• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Picks a unit - change name

Status
Not open for further replies.
Level 5
Joined
Nov 29, 2007
Messages
106
Hi!
I found somewhere on this forum post with answer that I need 1 month ago, but now when I need that I can't find that :)
So Picking heroes are like in dota (Taverns - 250g for buy unit)
When we pick an unit we get the name of that unit. Example:
I pick hero named Kunkka so whenever i may say smth it look like: Redblack (Kunkka) : Blablabla
 
  • Trigger1
  • Events
    • Unit - A unit sells a unit
  • Conditions
    • ((Sold unit) is a Hero) Equal to True
  • Actions
    • Set Hero[Player number of (Owner of (Sold unit))] = (Sold unit)
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • If (All conditions are true) then do (Actions) else do (Actions)
        • If - Conditions
          • ((Picked player)'s slot status) Equal to Is Playing
          • ((Picked player) controller) Equal to User
        • Then - Actions
          • Player - Set name of (Picked player) to ((Name of (Picked player)) + (( + ((Proper name of Hero[Player number of (Picked player)]) + ))))
To "combine" strings, use the "Concatenate strings" function, when you are supposed to enter a string.
 
Status
Not open for further replies.
Top