[Trigger] Its possible give unit same order then another one?

Status
Not open for further replies.
Level 2
Joined
Jan 7, 2013
Messages
13
Let me explain, i wanna replace some unit but i want the new unit have the same status - including buffs- and the same order than the old one.its possible do that?
Thanks at all,
Jamal XVI
 
I have not tested it but I belive it should work this way
  • swap
    • Events
    • Conditions
    • Actions
      • Custom script: local integer id = LoadInteger(hashtable, GetHandleId(unit), 1)
      • Custom script: local unit u = LoadUnitHandle(udg_hashtable, GetHandleId(unit), 2)
      • Set target = Paladin 0000 <gen>
      • Set target2 = (Target unit of issued order)
      • Set exp = (Hero experience of target)
      • Unit - Replace target with a Mountain King using The old unit's relative life and mana
      • Hero - Add exp experience to (Last created unit), Hide level-up graphics
      • Custom script: call IssueTargetOrder(bj_lastCreatedUnit, id, u)
  • order
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • Custom script: call SaveInteger(udg_hashtable, GetHandleId(udg_GetTriggeUnit()), 1, GetIssuedOrderId())
      • Custom script: call SaveUnitHandle(udg_hashtable, GetHandleId(udg_GetTriggeUnit()), 2,GetOrderTargetUnit() )
 
Status
Not open for further replies.
Back
Top