corvusHaunt
New Member
- Reaction score
- 96
Small JASS Problem, help please!
BOOOORED OF GUI!!! :banghead:
I am learning and experimenting in JASS using some knowledge I have, and JassCraft to find the natives and what not.
I was trying to make a trigger that displayed the message, using my own "DisplayTextToPlayer" variant.
And my function:
Do I have to use a native for this, and use this instead: ?
And also! Why do you have to provide a real x and real y argument for
DisplayTextToPlayer?
EDIT: Now that I look at it, it is obvious the problem: TextToPlayer doesn't do anything! Haha, way to go me
Well, can I make it something like a native, where you just call it as it is? I know I could just use DisplayTextToPlayer... but I want to do the same thing without the real x and real y. Yes, I also know that it's only like 4 extra characters, but I tend to like making things harder than they really need to be.
BOOOORED OF GUI!!! :banghead:
I am learning and experimenting in JASS using some knowledge I have, and JassCraft to find the natives and what not.
I was trying to make a trigger that displayed the message, using my own "DisplayTextToPlayer" variant.
Code:
function Trig_Blah_Actions takes nothing returns nothing
call TextToPlayer(Player(0), "Random test text of doom!" )
endfunction
function InitTrig_Blah takes nothing returns nothing
set gg_trg_Blah = CreateTrigger( )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Blah, Player(0) )
call TriggerAddAction( gg_trg_Blah, function Trig_Blah_Actions )
endfunction
And my function:
Code:
function TextToPlayer takes player toPlayer, string playertext returns nothing
endfunction
Do I have to use a native for this, and use this instead: ?
Code:
function TextToPlayer takes player toPlayer, real x, real y, string playertext returns nothing
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, playertext )
endfunction
And also! Why do you have to provide a real x and real y argument for
DisplayTextToPlayer?
EDIT: Now that I look at it, it is obvious the problem: TextToPlayer doesn't do anything! Haha, way to go me
Well, can I make it something like a native, where you just call it as it is? I know I could just use DisplayTextToPlayer... but I want to do the same thing without the real x and real y. Yes, I also know that it's only like 4 extra characters, but I tend to like making things harder than they really need to be.