Tool tips

pr0-assasin

New Member
Reaction score
4
How are you able to space them out on different lines like a tower defence, because holding spacebar I would think would be unreliable and tedious
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
|n

Putting that skips to the next line in the tooltip.

Code:
Level 1|n200 Damage
becomes
Code:
Level 1
200 Damage
 

educator

New Member
Reaction score
9
|n for tooltips is a line down (haha i used to use the space bar, its annoying)
/n for code (i think its only for jass)
so |n|n would be 2 lines |n|n|n would be 3 lines ect.
also you do not need a space after |n because |n does not show up in-game
DO NOT +rep me coz i just added detail to the above post
 

gabriono

New Member
Reaction score
0
or make another
Trigger:
  • Game-Display to (player/s) the text<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" />your text)


and the text will be in a new paragraph...
 

Ashlebede

New Member
Reaction score
43
or make another
Trigger:
  • Game-Display to (player/s) the text<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" />your text)



and the text will be in a new paragraph...

Off-Topic : That's a more computer-hungry alternative. In GUI triggers, you can make line skips in a string as you normally would, anyways.

Besides, he asked for tooltips, not game messages. I was just correcting educator.
 

gabriono

New Member
Reaction score
0
Oh youre right.. sorry..but what do you mean with "Off-Topic : That's a more computer-hungry alternative." ?!?
 

Ashlebede

New Member
Reaction score
43
Displaying a message to a player will call a JASS function :

JASS:
    call DisplayTextToForce( GetPlayersAll(), &quot;Text\nMore text&quot; ) //this does the same as the following :

call DisplayTextToForce( GetPlayersAll(), &quot;Text&quot; ) 
call DisplayTextToForce( GetPlayersAll(), &quot;More text&quot; )


Now, every time you call a JASS function, the compiler will search for that function in the thousands of lines in your map's code. It's shorter than it sounds, but still takes some time for nothing. Using the function only once will make that search happen only once, thus making the code more efficient. Also note that the function [ljass]GetPlayersAll()[/ljass] is called twice, as well.
 
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