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

[vJASS] How to use a function defined in vjass library?

Status
Not open for further replies.
Level 13
Joined
Mar 13, 2013
Messages
299
So, a couple of days ago I posted this thread ( http://www.hiveworkshop.com/forums/triggers-scripts-269/w3mmd-251087/ ).

You don't need to go to it (unless you really want to). Anyway, I got a lot of help from an outside source and now my question has changed somewhat completely. Here's the breakdown: I have a bunch of functions defined by a vJass library. I need to call one of those functions - which I believe must be done 'on victory' or 'on defeat.'

So, assuming the function "FlagPlayer" is defined in the vJass library mentioned above, I just want to confirm that this will work in Jass:

JASS:
function Trig_Player1_Actions takes nothing returns nothing
    call FlagPlayer( GetPlayerName(Player(0)), 103 )
endfunction

//===========================================================================
function InitTrig_Player1 takes nothing returns nothing
    set gg_trg_Player1 = CreateTrigger(  )
    call TriggerRegisterPlayerEventVictory( gg_trg_Player1, Player(0) )
    call TriggerAddAction( gg_trg_Player1, function Trig_Player1_Actions )
endfunction
 
Status
Not open for further replies.
Top