- Joined
- Jun 7, 2008
- Messages
- 440
I have this custom script:
Now i have this trigger that calls it forth:
JASS:
function SetPlayerPrefix takes unit hero returns nothing
local string txt
local player player_owner = GetOwningPlayer(hero)
local integer player_owner_id = GetPlayerId(player_owner)
set txt = udg_PlayerName[player_owner_id] + " (" + GetUnitName(hero) + ")"
call SetPlayerName(player_owner, txt)
set txt = null
set player_owner = null
endfunction
Now i have this trigger that calls it forth:
-
Events
- Unit - a unit enters HeroSelection
-
Conditions
- ((Entering unit)Belongs to an ally of Player 10 (Light Blue) equal to True
- (Unit-type of (Entering unit)) equal to HeroSelector
-
Actions
- Unit - Remove (entering unit) from the game
- Camera - Pan camera for (owner of (Entering unit)) to (center of Light Teleport Base) facing Default building facing (270.0) degress
- Set RandomUnitLight = Random unit from LightHeros
- Unit - create 1 unit-type RandomUnitLight for triggering player at Center of Light Teleport Base) facing Default building facing (270) degrees
- Custom script: call SetPlayerPrefix(udg_RandomUnitLight)
- Set Players_Hero [(Player number of (triggering player))] = (last created unit)
- Unit-Group - RandomUnitLight from LightHeros
- Set RandomUnitLight = no unit
- Player - add 250 to (Owner of (entering unit) current gold
- Cinematic - Fade in over 2 seconds using texture Dream and color (100.0%, 100.0%, 100.0%)with 0% transparency