[Solved] Simple Jass Conversion

Status
Not open for further replies.
The following commands are not available written in GUI but I do not know Jass. Could someone please convert this to jass for me?

  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • -------- Pretend this is in a loop --------
      • -------- All Variables are Global --------
      • Unit - Order IndexedUnit[LoopCount] to SavedOrder[LoopCount] - IndexedUnit[1]
      • Unit - Order IndexedUnit[LoopCount] to SavedOrder[LoopCount] - SavedPoint[LoopCount]
      • Unit - Order IndexedUnit[LoopCount] to SavedOrder[LoopCount] - SavedItem[LoopCount]
      • Unit - Order IndexedUnit[LoopCount] to SavedOrder[LoopCount]
 
JASS:
call IssueTargetOrder(udg_IndexedUnit[udg_LoopCount], udg_SavedOrder[udg_LoopCount], udg_IndexedUnit[1])
call IssuePointOrderLoc(udg_IndexedUnit[udg_LoopCount], udg_SavedOrder[udg_LoopCount], udg_SavedPoint[udg_LoopCount]])
call IssueTargetOrder(udg_IndexedUnit[udg_LoopCount], udg_SavedOrder[udg_LoopCount], udg_SavedItem[udg_LoopCount]) //same as first one actually because it just takes a widget target (widget = unit, item, destructible)
call IssueImmediateOrder(udg_IndexedUnit[udg_LoopCount], udg_SavedOrder[udg_LoopCount])

//or with integer orders:
set udg_SavedOrderInt[??] = GetIssuedOrderId()

call IssueTargetOrderById(udg_IndexedUnit[udg_LoopCount], udg_SavedOrderInt[udg_LoopCount], udg_IndexedUnit[1])
call IssuePointOrderByIdLoc(udg_IndexedUnit[udg_LoopCount], udg_SavedOrderInt[udg_LoopCount], udg_SavedPoint[udg_LoopCount]])
call IssueTargetOrderById(udg_IndexedUnit[udg_LoopCount], udg_SavedOrderInt[udg_LoopCount], udg_SavedItem[udg_LoopCount])
call IssueImmediateOrderById(udg_IndexedUnit[udg_LoopCount], udg_SavedOrderInt[udg_LoopCount])
Some orders don't have strings associated with them and are just integer orders. It would probably be better to store the integer rather than the string version of the order, since they all have integer orders. Use whichever works, though.
 
It will only ever run in this circumstance so I think we should be good. Thank you for the caution though :)
  • Begin QueuedCast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • UnitIsCasting[(Custom value of (Triggering unit))] Equal to 1
    • Actions
      • Set VariableSet CustomValueShortcut = (Custom value of (Triggering unit))
      • Set VariableSet QueuedSpellOrder[CustomValueShortcut] = (String((Current order of (Triggering unit))))
      • Set VariableSet QueuedSpellTargetLocation[CustomValueShortcut] = (Target point of ability being cast)
      • Set VariableSet QueuedSpellTargetUnit[CustomValueShortcut] = (Target unit of ability being cast)
      • Unit - Order (Triggering unit) to Stop.
      • Animation - Play (Triggering unit)'s stand animation
It will act as a basic spell holder for over-eager players that start trying to cast spell #2 before spell #1 is finished.
 
Status
Not open for further replies.
Back
Top