• 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.

[JASS] New Ideas.

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
Due to the effect of not wanting to convert my map to tft. (Please dont ask why) Ive decided that Jass would be easier to work with. i've read a few tutorials, and i can do some small things with jass, but im still a novice so bear with me. To put it simply, i turned the gui to Jass, and am trying to figure out why it isnt working. (the trigger itself works. But it will not kill the leaving players' troops.)

function Trig__Red_Func002002 takes nothing returns nothing
call KillUnit( GetTriggerUnit() )
endfunction

function Trig__Red_Actions takes nothing returns nothing
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_ALWAYSHINT, "TRIGSTR_947" )
call ForGroupBJ( GetUnitsOfPlayerAll(Player(0)), function Trig__Red_Func002002 )
call TriggerSleepAction( 1.00 )
call DisableTrigger( GetTriggeringTrigger() )
endfunction

//===========================================================================
function InitTrig__Red takes nothing returns nothing
set gg_trg__Red = CreateTrigger( )
call TriggerRegisterPlayerEventLeave( gg_trg__Red, Player(0) )
call TriggerAddAction( gg_trg__Red, function Trig__Red_Actions )
endfunction


Please look it over and see where i went wrong.
OFFTOPIC : Do i put this in /trigger format?? or what :p
 
Level 9
Joined
Jun 7, 2008
Messages
440
JASS:
function Trig__Red_Func002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction

function Trig__Red_Actions takes nothing returns nothing
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_ALWAYSHINT, "TRIGSTR_947" )
call ForGroupBJ( GetUnitsOfPlayerAll(Player(0)), function Trig__Red_Func002002 )
call TriggerSleepAction( 1.00 )
call DisableTrigger( GetTriggeringTrigger() )
endfunction

//===========================================================================
function InitTrig__Red takes nothing returns nothing
set gg_trg__Red = CreateTrigger( )
call TriggerRegisterPlayerEventLeave( gg_trg__Red, Player(0) )
call TriggerAddAction( gg_trg__Red, function Trig__Red_Actions )
endfunction

Testing. :p So all i have to do is replace trigger for enum like this?
Thanks Just a question what does enum stand for?
 
Status
Not open for further replies.
Top