• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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