- Joined
- Dec 15, 2012
- Messages
- 650
Here's my trigger
Simple questions :
1.The loop will end when I set LoopInteger = (Int_UnitAfterDead - 1) right ?
2.Will the GUI work as Jass ?
Extra question :
What is the difference of vJass and Jass ?
[highlight]Thanks for replying[/code]
-
Corpse Continues Decay
-
Events
- Unit - A unit Dies
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Peasant
-
Actions
-
For each (Integer LoopInteger) from 1 to Int_UnitAfterDead, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering unit) Equal to Suspended_Corpse[LoopInteger]
-
Then - Actions
- Set TempInteger = (Integer A)
- Trigger - Run Remove DummyItems <gen> (checking conditions)
- Set LoopInteger = (Int_UnitAfterDead - 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer LoopInteger) from 1 to Int_UnitAfterDead, do (Actions)
-
Events
JASS:
function Trig_ABCD_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hpea' ) ) then
return false
endif
return true
endfunction
function Trig_ABCD_Func002Func001C takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Suspended_Corpse[udg_LoopInteger] ) ) then
return false
endif
return true
endfunction
function Trig_ABCD_Actions takes nothing returns nothing
set udg_LoopInteger = 1
loop
exitwhen udg_LoopInteger > udg_Int_UnitAfterDead
if ( Trig_ABCD_Func002Func001C() ) then
set udg_TempInteger = GetForLoopIndexA()
call ConditionalTriggerExecute( gg_trg_Remove_DummyItems )
set udg_LoopInteger = ( udg_Int_UnitAfterDead - 1 )
else
endif
set udg_LoopInteger = udg_LoopInteger + 1
endloop
endfunction
//===========================================================================
function InitTrig_ABCD takes nothing returns nothing
set gg_trg_ABCD = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ABCD, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_ABCD, Condition( function Trig_ABCD_Conditions ) )
call TriggerAddAction( gg_trg_ABCD, function Trig_ABCD_Actions )
endfunction
1.The loop will end when I set LoopInteger = (Int_UnitAfterDead - 1) right ?
2.Will the GUI work as Jass ?
Extra question :
What is the difference of vJass and Jass ?
[highlight]Thanks for replying[/code]