2 Helps!! Text/Change Name

Levdragon

Member
Reaction score
2
Hey,

I was wondering how to change a players name when in game but with their original name still in-tact for example if the race the player chose was {Human} the player's name would change into |Levdragon {Human}.| Also how would I make it so every 60 seconds text appears for all to see reading the regions controled eg. |Levdragon {Human}| controls A1,A2,B1. Something like that. Or after this Event takes place.

Unit-A unit dies
Condition (No need to state I think?? Tell me if you need them for you to be able to help.)
Actions-Unit-Create 1 A1 for Owner of (Killing Unit) at position of Dying Unit.

And after the unit is replaced how would i do make it say Levdragon {Human} has captured A1, or whichever player has captured it i.e FourmHelper {Undead} has captured A1.
 

black.sheep

Active Member
Reaction score
24
Umm here.
Code:
Name Change
    Events
        Map initialization
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Player - Set name of (Picked player) to ((Name of (Picked player)) + (Race))
Code:
AI Spawn
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to Footman
    Actions
        Unit - Create 1 Footman for (Owner of (Killing unit)) at (Position of (Dying unit)) facing Default building facing degrees
        Game - Display to (All players) the text: ((Name of (Triggering player)) + Has captured Loc)
Not 100% sure how you would get the race of the player, gl on that.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
To get the race you can either Jass it, I think, or you can set a primary hero, building, or w/e, to a variable. Then, just check who has that defining thing.
 

Taishaku

New Member
Reaction score
9
You can use Player - Set Name. Use Convert Unit-Type to String, I guess, with another trigger taking the player's name changed to a unit-type without the race, then adding a string to the end that is his race... I'm thinking two GUI triggers or one long one.
 

saw792

Is known to say things. That is all.
Reaction score
280
Code:
Name Change
    Events
        Map initialization
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Custom Script: if GetPlayerRace(GetEnumPlayer()) == RACE_HUMAN then
                Custom Script: set udg_s = "{Human}"
                Custom Script: elseif GetPlayerRace(GetEnumPlayer()) == RACE_ORC then
                Custom Script: set udg_s = "{Orc}"
                Custom Script: elseif GetPlayerRace(GetEnumPlayer()) == RACE_NIGHTELF then
                Custom Script: set udg_s = "{Night Elf}"
                Custom Script: elseif GetPlayerRace(GetEnumPlayer()) == RACE_UNDEAD then
                Custom Script: set udg_s = "{Undead}"
                Custom Script: endif
                Player - Set name of (Picked player) to ((Name of (Picked player)) +" " + s)

s is a string variable created in the variable editor.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top