Is there a way to name something like a beacon after its current player? For example, I have this Death/Revival system that spawns a beacon at a dead marine. And when another player stands on top of it, it starts to revive the fallen player. Is there a way to spawn a beacon named after the player that died? Like a <d ref="Player,GetPlayerName"/> or something like that???
The data editor is never involved in the running of individual games, so it can never know a player's name or how many players are in the game, for example.
Use triggers.
Catalog Set Field Value:
Unit: (whatever unit you want to rename)
Field: "CUnit_Name"
New value: Name of player (player)
Player: player
Set value of Catalog "Units" Entry "?????" (What goes here?) Field Path (CUnit_Name) for player (Triggering player) to "???" (Cannot find player name in this option)
For entry, you need to convert Game Link (unit type of the unit you want to rename) to string, and to get player name you need to convert text to string.
You can't name a single unit this way. It'll change all units of this type. Possibly only the units created after the change, but I haven't tested so I'm not sure.
It will change all units of that type for only that one player. It works just like upgrades do. If each player is only going to have one corpse or hero unit, this isn't a problem.
Oh, you're right, sorry about that. Come to think of it, what you're asking of might not be possible actually. Player name is a text, and texts cannot be converted to any other variable types.
So if a player dies and spawns a beacon, I cannot change the beacon name? Hell, then I might as well just use a text tag over the beacon... Easier I guess.
Is there a way to name something like a beacon after its current player? For example, I have this Death/Revival system that spawns a beacon at a dead marine. And when another player stands on top of it, it starts to revive the fallen player. Is there a way to spawn a beacon named after the player that died? Like a <d ref="Player,GetPlayerName"/> or something like that???
@NotDeadYet3: Go
The data editor is never involved in the running of individual games, so it can never know a player's name or how many players are in the game, for example.
Use triggers.
Catalog Set Field Value: Unit: (whatever unit you want to rename) Field: "CUnit_Name" New value: Name of player (player) Player: player
Set value of Catalog "Units" Entry "?????" (What goes here?) Field Path (CUnit_Name) for player (Triggering player) to "???" (Cannot find player name in this option)
-thanks :)
For entry, you need to convert Game Link (unit type of the unit you want to rename) to string, and to get player name you need to convert text to string.
You can't name a single unit this way. It'll change all units of this type. Possibly only the units created after the change, but I haven't tested so I'm not sure.
@Builder_Bob: Go
It will change all units of that type for only that one player. It works just like upgrades do. If each player is only going to have one corpse or hero unit, this isn't a problem.
For the player, there is no 'text to string' :/
Oh, you're right, sorry about that. Come to think of it, what you're asking of might not be possible actually. Player name is a text, and texts cannot be converted to any other variable types.
So if a player dies and spawns a beacon, I cannot change the beacon name? Hell, then I might as well just use a text tag over the beacon... Easier I guess.
Actually I asked the same question on another post.. and didn't see this here..
Anyone know if this is possible at all?