Quick JASS question!

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.

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 :p
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.
 

corvusHaunt

New Member
Reaction score
96
I know, but I want to make it my own little native!! WAHHHHHHH. :p
I can just deal with it. Thanks for replying.
 

emjlr3

Change can be a good thing
Reaction score
395
native all called that rightly so because they don not call any othe rfunctions, which urs does, thus it is not a native, just another custom made function
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top