• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] player rename mechanic

Status
Not open for further replies.
Level 2
Joined
May 19, 2008
Messages
18
I've seen it alot in recent games, you type
-rename Blarg
and your name becomes "blarg"

I'm trying to set this up to have the player be able to set the name of the team they are playing on (so it shows up on the leaderboard).

Basically all I have to do is set a variable to a string entered by the player. However, the player has to be the team leader that is randomly chosen at the beginning of the game. I try to set up a simple event check "if player (team1lead) enters chat message"...
but when I try to select my "team1lead" variable, it says "no variables of this type exist"

WTF!
 
That's not my problem.
I want the trigger to respond ONLY if the player typing -rename is the team leader.
It doesn't seem to let me use the "teamleader" variable in the event. Do I actually have to go through and make a separate trigger for every single player?
 
i have a similar system in my map, you could do it like this

  • nametest
    • Events
      • Player - Player 1 types a chat message containing -name as A substring
      • Player - Player 2 .........
      • Player - Player 3 ......... and so on
    • Conditions
      • (Triggering player) Equal to (Player(teamleader))
    • Actions
      • Set teamname = (Substring((Entered chat string), 7, (Integer((Entered chat string)))))
teamleader is a integer, so you set the teamleader into a number and now u can use it in your conditions

maybe i can help u with this :)
 
Status
Not open for further replies.
Back
Top