- Joined
- Jul 12, 2010
- Messages
- 1,735
hey there, i need help to merge JASS triggers into 1...
TIPS:
1)im NOOB with Jass and i have absolutely no knowledge about it!!
2)can i merge the triggers if they were GUI and converted to custom text?
well here are the simple triggers that i want to merge...
as you can see that takes 6 triggers and it would be way better if it could take only 1..
thnx in advance and +rep to anybody that helps me!!
TIPS:
1)im NOOB with Jass and i have absolutely no knowledge about it!!
2)can i merge the triggers if they were GUI and converted to custom text?
well here are the simple triggers that i want to merge...
-
Enter Dungeon lvl 1
-
Events
- Unit - A unit enters Enter Dungeon lvl 1 <gen>
- Conditions
-
Actions
- Set Move_Point[1] = (Center of Exit Dungeon lvl 1 <gen>)
- Set Move_Point[2] = (Move_Point[1] offset by 100.00 towards 360.00 degrees)
- Unit - Move (Triggering unit) instantly to Move_Point[2]
- Custom script: call RemoveLocation(udg_Move_Point[1])
- Custom script: call RemoveLocation(udg_Move_Point[2])
-
Events
-
Exit Dungeon lvl 1
-
Events
- Unit - A unit enters Exit Dungeon lvl 1 <gen>
- Conditions
-
Actions
- Set Move_Point[1] = (Center of Enter Dungeon lvl 1 <gen>)
- Set Move_Point[2] = (Move_Point[1] offset by 100.00 towards 180.00 degrees)
- Unit - Move (Triggering unit) instantly to Move_Point[2]
- Custom script: call RemoveLocation(udg_Move_Point[1])
- Custom script: call RemoveLocation(udg_Move_Point[2])
-
Events
-
Enter Dungeon lvl 2
-
Events
- Unit - A unit enters Enter Dungeon lvl 2 <gen>
- Conditions
-
Actions
- Set Move_Point[1] = (Center of Exit Dungeon lvl 2 <gen>)
- Set Move_Point[2] = (Move_Point[1] offset by 100.00 towards 360.00 degrees)
- Unit - Move (Triggering unit) instantly to Move_Point[2]
- Custom script: call RemoveLocation(udg_Move_Point[1])
- Custom script: call RemoveLocation(udg_Move_Point[2])
-
Events
-
Exit Dungeon lvl 2
-
Events
- Unit - A unit enters Exit Dungeon lvl 2 <gen>
- Conditions
-
Actions
- Set Move_Point[1] = (Center of Enter Dungeon lvl 2 <gen>)
- Set Move_Point[2] = (Move_Point[1] offset by 100.00 towards 180.00 degrees)
- Unit - Move (Triggering unit) instantly to Move_Point[2]
- Custom script: call RemoveLocation(udg_Move_Point[1])
- Custom script: call RemoveLocation(udg_Move_Point[2])
-
Events
-
Enter Dungeon lvl 3
-
Events
- Unit - A unit enters Enter Dungeon lvl 3 <gen>
- Conditions
-
Actions
- Set Move_Point[1] = (Center of Exit Dungeon lvl 3 <gen>)
- Set Move_Point[2] = (Move_Point[1] offset by 100.00 towards 360.00 degrees)
- Unit - Move (Triggering unit) instantly to Move_Point[2]
- Custom script: call RemoveLocation(udg_Move_Point[1])
- Custom script: call RemoveLocation(udg_Move_Point[2])
-
Events
-
Exit Dungeon lvl 3
-
Events
- Unit - A unit enters Exit Dungeon lvl 3 <gen>
- Conditions
-
Actions
- Set Move_Point[1] = (Center of Enter Dungeon lvl 3 <gen>)
- Set Move_Point[2] = (Move_Point[1] offset by 100.00 towards 180.00 degrees)
- Unit - Move (Triggering unit) instantly to Move_Point[2]
- Custom script: call RemoveLocation(udg_Move_Point[1])
- Custom script: call RemoveLocation(udg_Move_Point[2])
-
Events
JASS:
function Trig_Enter_Dungeon_lvl_1_Actions takes nothing returns nothing
set udg_Move_Point[1] = GetRectCenter(gg_rct_Exit_Dungeon_lvl_1)
set udg_Move_Point[2] = PolarProjectionBJ(udg_Move_Point[1], 100.00, 360.00)
call SetUnitPositionLoc( GetTriggerUnit(), udg_Move_Point[2] )
call RemoveLocation(udg_Move_Point[1])
call RemoveLocation(udg_Move_Point[2])
endfunction
//===========================================================================
function InitTrig_Enter_Dungeon_lvl_1 takes nothing returns nothing
set gg_trg_Enter_Dungeon_lvl_1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Dungeon_lvl_1, gg_rct_Enter_Dungeon_lvl_1 )
call TriggerAddAction( gg_trg_Enter_Dungeon_lvl_1, function Trig_Enter_Dungeon_lvl_1_Actions )
endfunction
JASS:
function Trig_Exit_Dungeon_lvl_1_Actions takes nothing returns nothing
set udg_Move_Point[1] = GetRectCenter(gg_rct_Enter_Dungeon_lvl_1)
set udg_Move_Point[2] = PolarProjectionBJ(udg_Move_Point[1], 100.00, 180.00)
call SetUnitPositionLoc( GetTriggerUnit(), udg_Move_Point[2] )
call RemoveLocation(udg_Move_Point[1])
call RemoveLocation(udg_Move_Point[2])
endfunction
//===========================================================================
function InitTrig_Exit_Dungeon_lvl_1 takes nothing returns nothing
set gg_trg_Exit_Dungeon_lvl_1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Exit_Dungeon_lvl_1, gg_rct_Exit_Dungeon_lvl_1 )
call TriggerAddAction( gg_trg_Exit_Dungeon_lvl_1, function Trig_Exit_Dungeon_lvl_1_Actions )
endfunction
JASS:
function Trig_Enter_Dungeon_lvl_2_Actions takes nothing returns nothing
set udg_Move_Point[1] = GetRectCenter(gg_rct_Exit_Dungeon_lvl_2)
set udg_Move_Point[2] = PolarProjectionBJ(udg_Move_Point[1], 100.00, 360.00)
call SetUnitPositionLoc( GetTriggerUnit(), udg_Move_Point[2] )
call RemoveLocation(udg_Move_Point[1])
call RemoveLocation(udg_Move_Point[2])
endfunction
//===========================================================================
function InitTrig_Enter_Dungeon_lvl_2 takes nothing returns nothing
set gg_trg_Enter_Dungeon_lvl_2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Dungeon_lvl_2, gg_rct_Enter_Dungeon_lvl_2 )
call TriggerAddAction( gg_trg_Enter_Dungeon_lvl_2, function Trig_Enter_Dungeon_lvl_2_Actions )
endfunction
JASS:
function Trig_Exit_Dungeon_lvl_2_Actions takes nothing returns nothing
set udg_Move_Point[1] = GetRectCenter(gg_rct_Enter_Dungeon_lvl_2)
set udg_Move_Point[2] = PolarProjectionBJ(udg_Move_Point[1], 100.00, 180.00)
call SetUnitPositionLoc( GetTriggerUnit(), udg_Move_Point[2] )
call RemoveLocation(udg_Move_Point[1])
call RemoveLocation(udg_Move_Point[2])
endfunction
//===========================================================================
function InitTrig_Exit_Dungeon_lvl_2 takes nothing returns nothing
set gg_trg_Exit_Dungeon_lvl_2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Exit_Dungeon_lvl_2, gg_rct_Exit_Dungeon_lvl_2 )
call TriggerAddAction( gg_trg_Exit_Dungeon_lvl_2, function Trig_Exit_Dungeon_lvl_2_Actions )
endfunction
JASS:
function Trig_Enter_Dungeon_lvl_3_Actions takes nothing returns nothing
set udg_Move_Point[1] = GetRectCenter(gg_rct_Exit_Dungeon_lvl_3)
set udg_Move_Point[2] = PolarProjectionBJ(udg_Move_Point[1], 100.00, 360.00)
call SetUnitPositionLoc( GetTriggerUnit(), udg_Move_Point[2] )
call RemoveLocation(udg_Move_Point[1])
call RemoveLocation(udg_Move_Point[2])
endfunction
//===========================================================================
function InitTrig_Enter_Dungeon_lvl_3 takes nothing returns nothing
set gg_trg_Enter_Dungeon_lvl_3 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Enter_Dungeon_lvl_3, gg_rct_Enter_Dungeon_lvl_3 )
call TriggerAddAction( gg_trg_Enter_Dungeon_lvl_3, function Trig_Enter_Dungeon_lvl_3_Actions )
endfunction
JASS:
function Trig_Exit_Dungeon_lvl_3_Actions takes nothing returns nothing
set udg_Move_Point[1] = GetRectCenter(gg_rct_Enter_Dungeon_lvl_3)
set udg_Move_Point[2] = PolarProjectionBJ(udg_Move_Point[1], 100.00, 180.00)
call SetUnitPositionLoc( GetTriggerUnit(), udg_Move_Point[2] )
call RemoveLocation(udg_Move_Point[1])
call RemoveLocation(udg_Move_Point[2])
endfunction
//===========================================================================
function InitTrig_Exit_Dungeon_lvl_3 takes nothing returns nothing
set gg_trg_Exit_Dungeon_lvl_3 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Exit_Dungeon_lvl_3, gg_rct_Exit_Dungeon_lvl_3 )
call TriggerAddAction( gg_trg_Exit_Dungeon_lvl_3, function Trig_Exit_Dungeon_lvl_3_Actions )
endfunction
as you can see that takes 6 triggers and it would be way better if it could take only 1..
thnx in advance and +rep to anybody that helps me!!