Moderator
M
Moderator
16:00, 25th Oct 2012
Magtheridon96: Approved.
Magtheridon96: Approved.
Dummy Caster

Events


Map initialization

Conditions

Actions


Custom script: set udg_DC_Hash = InitHashtable()


-------- ---------------------------- --------


-------- Creating Dummy --------


-------- ---------------------------- --------


Set DC_Loc = (Center of (Playable map area))


For each (Integer DC_I) from 1 to 12, do (Actions)



Loop - Actions




Unit - Create 1 Dummy for (Player(DC_I)) at DC_Loc facing Default building facing degrees




Set DC_DummyCaster[DC_I] = (Last created unit)


Custom script: call RemoveLocation(udg_DC_Loc)


Custom script: endfunction


-------- ---------------------------- --------


-------- This function resets the dummy caster --------


-------- ---------------------------- --------


Custom script: function DummyCasterReset takes nothing returns nothing


-------- ---------------------------- --------


-------- you can remove this line if you want --------


-------- ---------------------------- --------


Custom script: call DisplayTextToForce( GetPlayersAll(), ( "Dummy Caster casted" + GetAbilityName(udg_DC_AddedAbil) ) )


-------- ---------------------------- --------


Set DC_Loc = (Center of (Playable map area))


Unit - Move DC_DummyCaster[DC_ID] instantly to DC_Loc


Custom script: call RemoveLocation(udg_DC_Loc)


Custom script: call UnitRemoveAbility(udg_DC_DummyCaster[udg_DC_ID],udg_DC_AddedAbil)


Custom script: endfunction


-------- ---------------------------- --------


-------- This function applies the ability to the dummy caster --------


-------- ---------------------------- --------


Custom script: function ApplyDummyCaster takes nothing returns nothing


Custom script: call UnitAddAbility(udg_DC_DummyCaster[udg_DC_ID],udg_DC_AddedAbil)


Custom script: call SetUnitAbilityLevel(udg_DC_DummyCaster[udg_DC_ID],udg_DC_AddedAbil,udg_DC_Level)


Custom script: endfunction


-------- ---------------------------- --------


-------- This function orders the dummy caster to target unit --------


-------- Use call ExecuteFunc("OrderDummyCasterTargetUnit") --------


-------- ---------------------------- --------


Custom script: function OrderDummyCasterTargetUnit takes nothing returns nothing


Custom script: call ApplyDummyCaster()


Unit - Move DC_DummyCaster[DC_ID] instantly to DC_Loc


Custom script: call IssueTargetOrder(udg_DC_DummyCaster[udg_DC_ID],udg_DC_Order,udg_DC_Target)


Custom script: call DummyCasterReset()


Custom script: endfunction


-------- ---------------------------- --------


-------- This function orders the dummy caster to target point --------


-------- Use call ExecuteFunc("OrderDummyCasterTargetPoint") --------


-------- ---------------------------- --------


Custom script: function OrderDummyCasterTargetPoint takes nothing returns nothing


Custom script: call ApplyDummyCaster()


Unit - Move DC_DummyCaster[DC_ID] instantly to DC_Loc


Custom script: call IssuePointOrderLoc(udg_DC_DummyCaster[udg_DC_ID],udg_DC_Order,udg_DC_TargetLoc)


Custom script: call DummyCasterReset()


Custom script: endfunction


-------- ---------------------------- --------


-------- This function orders the dummy caster to target destructable --------


-------- This is good for destroying trees --------


-------- Use call ExecuteFunc("OrderDummyCasterTargetDest") --------


-------- ---------------------------- --------


Custom script: function OrderDummyCasterTargetDest takes nothing returns nothing


Custom script: call ApplyDummyCaster()


Unit - Move DC_DummyCaster[DC_ID] instantly to DC_Loc


Custom script: call IssueTargetDestructableOrder(udg_DC_DummyCaster[udg_DC_ID],udg_DC_Order,udg_DC_TargetDest)


Custom script: call DummyCasterReset()


Custom script: endfunction


-------- ---------------------------- --------


-------- This function orders the dummy caster with no target --------


-------- Use call ExecuteFunc("OrderDummyCasterNoTarget") --------


-------- ---------------------------- --------


Custom script: function OrderDummyCasterNoTarget takes nothing returns nothing


Custom script: call ApplyDummyCaster()


Unit - Move DC_DummyCaster[DC_ID] instantly to DC_Loc


Custom script: call IssueImmediateOrder(udg_DC_DummyCaster[udg_DC_ID],udg_DC_Order)


Custom script: call DummyCasterReset()