creep way point system.... need help

G

gonecase

Guest
Hey

I have a open version of dota…. They used a creepway point system… bt I cant get it to work on my map… here’s the script… wats happenin is the creeps go to the mid/top/bottom point n then they go back to the base


set udg_unit_AttackToLeft=CreateUnit(p,'e00D',-6043.9,5314.7,212.15)
set udg_unit_AttackToMid=CreateUnit(p,'e00B',-713.7,-515.7,325.6)
set udg_unit_AttackToRight=CreateUnit(p,'e00A',5853.5,-6214.9,64.)
set udg_unit_AttackToSentinel=CreateUnit(p,'e008',-4690.8,-6680.8,57.52)
set udg_unit_AttackToScourge=CreateUnit(p,'e001',4836.,4372.2,212.11)

set udg_loc_DTAX_AttackToScourge=GetUnitLoc(udg_unit_AttackToScourge)
set udg_loc_DTAX_AttackToSentinel=GetUnitLoc(udg_unit_AttackToSentinel)
set udg_loc_DTAX_AttackToMid=GetUnitLoc(udg_unit_AttackToMid)
set udg_loc_DTAX_AttackToLeft=GetUnitLoc(udg_unit_AttackToLeft)
set udg_loc_DTAX_AttackToRight=GetUnitLoc(udg_unit_AttackToRight)
set udg_i_DTAX_creep_waypoint_ability_id='A06G'
set udg_locA_DTAX_waypoint_locations[1]=udg_loc_DTAX_AttackToSentinel
set udg_locA_DTAX_waypoint_locations[2]=udg_loc_DTAX_AttackToLeft
set udg_locA_DTAX_waypoint_locations[3]=udg_loc_DTAX_AttackToMid
set udg_locA_DTAX_waypoint_locations[4]=udg_loc_DTAX_AttackToRight
set udg_locA_DTAX_waypoint_locations[5]=udg_loc_DTAX_AttackToScourge


mob checking mid

function Trig_Mobs_SentinelMobsCheckpointMid_Conditions takes nothing returns boolean
if(not (GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_RedPlayers[0]))then
return false
endif
return true
endfunction

function Trig_Mobs_SentinelMobsCheckpointMid_Actions takes nothing returns nothing
call IssuePointOrderByIdLoc(GetTriggerUnit(),OrderId("attack"),udg_loc_DTAX_AttackToMid)
endfunction

function StartTrigger_Mobs_SentinelMobsCheckpointMid takes nothing returns nothing
set gg_trg_Mobs_SentinelMobsCheckpointMid=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Mobs_SentinelMobsCheckpointMid,gg_rct_SentinelRangedCreepSpawnCenter)
call TriggerRegisterEnterRectSimple(gg_trg_Mobs_SentinelMobsCheckpointMid,gg_rct_SentinelMeleeCreepSpawnCenter)
call TriggerAddCondition(gg_trg_Mobs_SentinelMobsCheckpointMid,Condition(function Trig_Mobs_SentinelMobsCheckpointMid_Conditions))
call TriggerAddAction(gg_trg_Mobs_SentinelMobsCheckpointMid,function Trig_Mobs_SentinelMobsCheckpointMid_Actions)
endfunction


top

function Trig_Mobs_SentinelMobsCheckpointLeft_Conditions takes nothing returns boolean
if(not (GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_RedPlayers[0]))then
return false
endif
return true
endfunction

function Trig_Mobs_SentinelMobsCheckpointLeft_Actions takes nothing returns nothing
call IssuePointOrderByIdLoc(GetTriggerUnit(),OrderId("attack"),udg_loc_DTAX_AttackToLeft)
endfunction

function StartTrigger_Mobs_SentinelMobsCheckpointLeft takes nothing returns nothing
set gg_trg_Mobs_SentinelMobsCheckpointLeft=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Mobs_SentinelMobsCheckpointLeft,gg_rct_SentinelRangedCreepSpawnLeft)
call TriggerRegisterEnterRectSimple(gg_trg_Mobs_SentinelMobsCheckpointLeft,gg_rct_SentinelMeleeCreepSpawnLeft)
call TriggerAddCondition(gg_trg_Mobs_SentinelMobsCheckpointLeft,Condition(function Trig_Mobs_SentinelMobsCheckpointLeft_Conditions))
call TriggerAddAction(gg_trg_Mobs_SentinelMobsCheckpointLeft,function Trig_Mobs_SentinelMobsCheckpointLeft_Actions)
endfunction

bottom

function Trig_Mobs_SentinelMobsCheckpointRight_Conditions takes nothing returns boolean
if(not (GetOwningPlayer(GetTriggerUnit())==udg_pA_DTAX_BluePlayers[0]))then
return false
endif
return true
endfunction

function Trig_Mobs_SentinelMobsCheckpointRight_Actions takes nothing returns nothing
call IssuePointOrderByIdLoc(GetTriggerUnit(),OrderId("attack"),udg_loc_DTAX_AttackToRight)
endfunction

function StartTrigger_Mobs_SentinelMobsCheckpointRight takes nothing returns nothing
set gg_trg_Mobs_SentinelMobsCheckpointRight=CreateTrigger()
call TriggerRegisterEnterRectSimple(gg_trg_Mobs_SentinelMobsCheckpointRight,gg_rct_ScourgeRangedCreepSpawnRight)
call TriggerRegisterEnterRectSimple(gg_trg_Mobs_SentinelMobsCheckpointRight,gg_rct_ScourgeMeleeCreepSpawnRight)
call TriggerAddCondition(gg_trg_Mobs_SentinelMobsCheckpointRight,Condition(function Trig_Mobs_SentinelMobsCheckpointRight_Conditions))
call TriggerAddAction(gg_trg_Mobs_SentinelMobsCheckpointRight,function Trig_Mobs_SentinelMobsCheckpointRight_Actions)
endfunction


next way point

function Trig_MobsManaging_Control_SetNextWaypoint_Conditions takes nothing returns boolean
return IsUnitMob(GetTriggerUnit())
endfunction

function Trig_MobsManaging_Control_SetNextWaypoint_Actions takes nothing returns nothing
if IsUnitRedMob(GetTriggerUnit())then
call SetUnitAbilityLevel(GetTriggerUnit(),udg_i_DTAX_creep_waypoint_ability_id,5)
else
call SetUnitAbilityLevel(GetTriggerUnit(),udg_i_DTAX_creep_waypoint_ability_id,1)
endif
if(GetReferecedUnit(GetTriggerUnit())==null)then
call SendUnitToNextWaypoint(GetTriggerUnit())
endif
endfunction

function StartTrigger_MobsManaging_Control_SetNextWaypoint takes nothing returns nothing
set gg_trg_MobsManaging_Control_SetNextWaypoint=CreateTrigger()
call TriggerRegisterUnitInRangeSimple(gg_trg_MobsManaging_Control_SetNextWaypoint,300.,udg_unit_AttackToRight)
call TriggerRegisterUnitInRangeSimple(gg_trg_MobsManaging_Control_SetNextWaypoint,300.,udg_unit_AttackToMid)
call TriggerRegisterUnitInRangeSimple(gg_trg_MobsManaging_Control_SetNextWaypoint,300.,udg_unit_AttackToLeft)
call TriggerAddCondition(gg_trg_MobsManaging_Control_SetNextWaypoint,Condition(function Trig_MobsManaging_Control_SetNextWaypoint_Conditions))
call TriggerAddAction(gg_trg_MobsManaging_Control_SetNextWaypoint,function Trig_MobsManaging_Control_SetNextWaypoint_Actions)
endfunction
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top