"x" has bought "x" text.

fgw

New Member
Reaction score
1
So this may be a little stupid, but I can't for the life of me figure out how to get my text to say "x player" has bought "x hero" from my tavern. I can make it display the unit name or the player name, but I can't get it to do both in one.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
You try using a variable to hold the name?
 

fgw

New Member
Reaction score
1
You try using a variable to hold the name?

No, I did not, I'll go give that a shot right now. Or not considering I just tried to make a variable and failed miserably, if theres an easier way to do it let me know while I go find a variable tutorial.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Click the variable editor, and choose a string variable.
 

fgw

New Member
Reaction score
1
Click the variable editor, and choose a string variable.

Yeaaaah, that didn't work as easily as you made it sound.
Its supposed to look like this. Game - Display to (All players) the text: (A player has chosen + (Name of (Sold unit))) The problem I'm having is I have no idea what will make it show that. I can get the name of the sold unit to pop up when selected, but not the "player has chosen" part before it.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Hmm. Not sure how to do this in GUI now...
 

LurkerAspect

Now officially a Super Lurker
Reaction score
118
Trigger:
  • Game - Display to (All players) the text: (Player name of (Owner of (Buying unit))) + ( has chosen the + (Name of (Sold unit))))


If that doesn't work, create a custom function with this line of text in it:

[ljass]call DisplayTextToForce(GetPlayersAll(),GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+("has bought the "+ GetUnitName(GetSoldUnit())))[/ljass]

would look like this
Trigger:
  • Custom script: call DisplayTextToForce(GetPlayersAll(),GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+("has bought the "+ GetUnitName(GetSoldUnit())))
 

fgw

New Member
Reaction score
1
Trigger:
  • Game - Display to (All players) the text: (Player name of (Owner of (Buying unit))) + ( has chosen the + (Name of (Sold unit))))


If that doesn't work, create a custom function with this line of text in it:

[ljass]call DisplayTextToForce(GetPlayersAll(),GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+("has bought the "+ GetUnitName(GetSoldUnit())))[/ljass]

would look like this
Trigger:
  • Custom script: call DisplayTextToForce(GetPlayersAll(),GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+("has bought the "+ GetUnitName(GetSoldUnit())))

Well the first one was what I was going for, but I can't make it have multiple actions in that one text. The second one looks great, but I C&Ped into the custom script and now it says theres an error. I can get it to (Player name of (Owner of (Buying unit))) but then I have no idea how to add the rest to it.
 

LurkerAspect

Now officially a Super Lurker
Reaction score
118
The second one looks great, but I C&Ped into the custom script and now it says theres an error.

Hmm... It should work, it does for me. Give it another go. Make sure you copy the entire line, try copying everything in this box:

call DisplayTextToForce(GetPlayersAll(),GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+("has bought the "+ GetUnitName(GetSoldUnit())))
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
yes that will give you string 1 + string 2 so that you click on and select more options
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top