• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] question about displaying text message to all players

Status
Not open for further replies.
Level 13
Joined
May 11, 2008
Messages
1,198
which of the following is better?

call DisplayTextToForce( GetPlayersAll(), udg_texts[11] )

or...
call DisplayTextToPlayer(Player(0), 0, 0, udg_texts[11])
call DisplayTextToPlayer(Player(1), 0, 0, udg_texts[11])
call DisplayTextToPlayer(Player(2), 0, 0, udg_texts[11])
call DisplayTextToPlayer(Player(3), 0, 0, udg_texts[11])
call DisplayTextToPlayer(Player(4), 0, 0, udg_texts[11])
call DisplayTextToPlayer(Player(5), 0, 0, udg_texts[11])
call DisplayTextToPlayer(Player(6), 0, 0, udg_texts[11])
call DisplayTextToPlayer(Player(7), 0, 0, udg_texts[11])
call DisplayTextToPlayer(Player(8), 0, 0, udg_texts[11])
call DisplayTextToPlayer(Player(9), 0, 0, udg_texts[11])
call DisplayTextToPlayer(Player(10), 0, 0, udg_texts[11])
call DisplayTextToPlayer(Player(11), 0, 0, udg_texts[11])

i've heard that red functions are to be avoided...but i don't know how to make purple function just one for all those. it's an easy matter for me to copy and paste and alter the number after Player( but i want to do whatever is best for the smoothness and of my map since i don't want it crashing.

i've been starting to learn a bit about vjass and a tutorial explained some ways to play around with the functions a bit but i still have a lot to learn about all the various functions...
 
Level 13
Joined
May 11, 2008
Messages
1,198
excellent...any good idea for making ForForce functions without red functions?

i'm planning to vjass up this trigger so don't worry about the stupid function name:
call ForForce( GetPlayersAllies(Player(2)), function Trig_resources_Func004002 )

so GetPlayersAllies is a red function. i was looking into trying to use ForForce but i'm not sure how to effectively choose the players with that without using red functions. if you can give me some examples that would be great and by the way what i need is for it to have the two forces are Player 0, 1, and 10, and the other force is Player 2-9 and 11.

this would help so much with so many triggers i think if you could solve this thing here!

anyway i'm pretty sure getplayersallies is better than whatever i was using before so if i have to i might still use it...but i wonder if there is a better way.
 
Status
Not open for further replies.
Top