What is this?

U

Unregistered

Guest
Hi i want to know what, thes 3 triggers does?

//===========================================================================
// Trigger: Weapon Move 1
//===========================================================================
function Trig_Weapon_Move_1_Func001A takes nothing returns nothing
call SetUnitPositionLoc( udg_PlayerShip_Control[GetConvertedPlayerId(GetEnumPlayer())], GetUnitLoc(udg_PlayerShip[GetConvertedPlayerId(GetEnumPlayer())]) )
endfunction

function Trig_Weapon_Move_1_Actions takes nothing returns nothing
call ForForce( GetPlayersAll(), function Trig_Weapon_Move_1_Func001A )
endfunction

//===========================================================================
function InitTrig_Weapon_Move_1 takes nothing returns nothing
set gg_trg_Weapon_Move_1 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Weapon_Move_1, 2.00 )
call TriggerAddAction( gg_trg_Weapon_Move_1, function Trig_Weapon_Move_1_Actions )
endfunction

//===========================================================================
// Trigger: Weapon Move 2
//===========================================================================
function Trig_Weapon_Move_2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'u00P' ) ) then
return false
endif
return true
endfunction

function Trig_Weapon_Move_2_Func001A takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), PolarProjectionBJ(GetUnitLoc(udg_PlayerShip[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))]), GetRandomReal(0.00, 128.00), GetRandomReal(0.01, 360.00)) )
call IssueTargetOrderBJ( GetEnumUnit(), "attack", udg_PlayerShip_Target[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] )
endfunction

function Trig_Weapon_Move_2_Actions takes nothing returns nothing
call ForGroupBJ( udg_PlayerShip_Cannons[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))], function Trig_Weapon_Move_2_Func001A )
endfunction

//===========================================================================
function InitTrig_Weapon_Move_2 takes nothing returns nothing
set gg_trg_Weapon_Move_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Weapon_Move_2, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Weapon_Move_2, Condition( function Trig_Weapon_Move_2_Conditions ) )
call TriggerAddAction( gg_trg_Weapon_Move_2, function Trig_Weapon_Move_2_Actions )
endfunction

//===========================================================================
// Trigger: Weapon Move 3
//===========================================================================
function Trig_Weapon_Move_3_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_ANCIENT) == true ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(GetAttacker()), GetUnitLoc(udg_PlayerShip[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))])) > 256.00 ) ) then
return false
endif
return true
endfunction

function Trig_Weapon_Move_3_Actions takes nothing returns nothing
call SetUnitPositionLoc( GetAttacker(), GetUnitLoc(udg_PlayerShip[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))]) )
endfunction

//===========================================================================
function InitTrig_Weapon_Move_3 takes nothing returns nothing
set gg_trg_Weapon_Move_3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Weapon_Move_3, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Weapon_Move_3, Condition( function Trig_Weapon_Move_3_Conditions ) )
call TriggerAddAction( gg_trg_Weapon_Move_3, function Trig_Weapon_Move_3_Actions )
endfunction
 

SFilip

Gone but not forgotten
Reaction score
634
this is considered as map unprotecting which we don't support here. clearly those triggers are ripped out from a (protected) map that's not yours.
 

Luth

Lex Luthor!
Reaction score
41
Do protected maps retain trigger comments? I've only used Vex's Optimizer, which is kind enough to remove junk, but havent used any of the others.
 

Demi666

New Member
Reaction score
127
a map unprotecter u say :rolleyes:

just kidding but how can that unprotect maps omfg lol?
 

SFilip

Gone but not forgotten
Reaction score
634
well vexorian's map protector is stronger - maps used with it are almost impossible to unprotect (function rename, comment and space removal etc). however a lot of people use heavy locker or try to do it manually which can easily be unprotected thus resulting in all triggers converted to jass the way creator of this topic posted them.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top