- Joined
- May 13, 2023
- Messages
- 72
Hello again Hive, I have a request of an ability which when casted upon an unit it gives it a buff that allows all of it's abilities to fire a second time. I tried to do this but i just can't get the spell's order. Here's my attempt
-
Mimic Dummy
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
((Triggering unit) has buff Mimic ) Equal to True
-
-
Actions
-
Custom script: local unit caster = GetTriggerUnit()
-
Custom script: local unit target = GetSpellTargetUnit()
-
Custom script: local integer abilityID = GetSpellAbilityId()
-
Custom script: local integer orderID = GetIssuedOrderId()
-
Custom script: local location pos = GetSpellTargetLoc()
-
Custom script: local unit dummy = CreateUnit(GetOwningPlayer(caster), 'n011', GetUnitX(caster), GetUnitY(caster), 1)
-
Custom script: call UnitAddAbility(dummy, abilityID)
-
Custom script: call SetUnitAbilityLevel(dummy, abilityID, GetUnitAbilityLevel(caster, abilityID))
-
Custom script: call IssuePointOrderById(dummy, udg_MimicOrder, GetLocationX(pos), GetLocationY(pos))
-
Custom script: call IssueTargetOrderById(dummy, udg_MimicOrder, target)
-
Custom script: call IssueImmediateOrderById(dummy, udg_MimicOrder)
-
Custom script: call RemoveLocation(pos)
-
Custom script: set caster = null
-
Custom script: set target = null
-
Custom script: call SetUnitState(caster, UNIT_STATE_LIFE, 500)
-
-
-
Mimic Order
-
Events
-
Unit - A unit Is issued an order targeting an object
-
Unit - A unit Is issued an order with no target
-
Unit - A unit Is issued an order targeting a point
-
-
Conditions
-
((Triggering unit) has buff Mimic ) Equal to True
-
(Issued order) Not equal to (Order(stop))
-
(Issued order) Not equal to (Order(smart))
-
(Issued order) Not equal to (Order(move))
-
(Issued order) Not equal to (Order(patrol))
-
(Issued order) Not equal to (Order(attack))
-
-
Actions
-
Custom script: set udg_MimicOrder = GetIssuedOrderId()
-
-