• 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.

[Trigger] Checking player name?

Status
Not open for further replies.
Level 2
Joined
Sep 5, 2015
Messages
10
Is there anyway to check a players name through triggers?
Example:
I create a shop that has a very overpowered item in it. But I only want a player with the name "Sakkuzi" to be able to buy it?
 
Last edited:
Level 10
Joined
Apr 4, 2010
Messages
509
  • Sakkuzi
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to Over Powered Item
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Name of (Owner of (Buying unit))) Equal to Sakkuzi
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Item - Remove (Sold Item)
          • Player - Add Refund to (Owner of (Buying unit)) Current gold
          • Game - Display to (Player group((Owner of (Buying unit)))) the text: Sorry, only Sakkuzi can buy this item
EDIT: To check for name it's found in String Comparison
 
Last edited:
Status
Not open for further replies.
Top