• 🏆 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!

Minor Question

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
All I did was convert a trigger to JASS. This is what I converted:
  • Events
  • Conditions
  • Actions
    • Game - Display to (All players) the text: Blah
When I converted it with JNGP, I get this:

]
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_980" )
endfunction

So I checked into it further, and got this:

JASS:
function DisplayTextToForce takes force toForce, string message returns nothing
    if (IsPlayerInForce(GetLocalPlayer(), toForce)) then
        // Use only local code (no net traffic) within this block to avoid desyncs.
        call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, message)
    endif
endfunction

All I did was tried to optimise it a bit. I had a text "blah" that I wanted to be displayed to all players. The end code (seems to me) that it would only display to the one player. Am I wrong?
 
Status
Not open for further replies.
Top