- Joined
- Jun 7, 2008
- Messages
- 440
All I did was convert a trigger to JASS. This is what I converted:
When I converted it with JNGP, I get this:
So I checked into it further, and got this:
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?
-
Events
-
Conditions
-
Actions
-
Game - Display to (All players) the text: Blah
-
]
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?