- Joined
- Jan 23, 2020
- Messages
- 86
I have a global range shop set up to prevent the delay in shop activation when picking a shop patron (target).
What I need is, based on the ability being cast, to target a corresponding unit.
Item Shop (open shop) should select patron unit A
Item Shop (open shop stash) should select patron unit B.
There is two threads with the answer I need here: Solution 1 Solution 2. But I am not sure how to implement the order ID that was suggested...
Current triggers:
What I need is, based on the ability being cast, to target a corresponding unit.
Item Shop (open shop) should select patron unit A
Item Shop (open shop stash) should select patron unit B.
There is two threads with the answer I need here: Solution 1 Solution 2. But I am not sure how to implement the order ID that was suggested...
constant native GetIssuedOrderId takes nothing returns integer
Anyway the order to change current shop target is 852566. It was listed here under...
constant integer ORDER_neutralinteract=852566
Selecting a unit to sell to is an order with an orderid (integer) but no orderstring.
Then you just need to order the shop to do that order on the unit you want to select. GUI will not let you use the order ID so you'll need to use one of the JASS functions for orders. I believe IssueNeutralTargetOrder(), though it could also be IssueTargetOrderById().
Current triggers:
-
Shop
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Item Shop (open shop)
-
-
Actions
-
Set VariableSet PN = (Player number of (Owner of (Triggering unit)))
-
Selection - Select PlayerShops[PN] for (Owner of (Triggering unit))
-
Custom script: call IssueTargetOrderById(udg_PlayerShops[udg_PN], 852566, udg_Player_Builder[udg_PN])
-
-
-
Shop Stash
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Item Shop (open shop stash)
-
-
Actions
-
Set VariableSet PN = (Player number of (Owner of (Triggering unit)))
-
Selection - Select PlayerShops[PN] for (Owner of (Triggering unit))
-
Custom script: call IssueTargetOrderById(udg_PlayerShops[udg_PN], 852566, udg_StashUnit[udg_PN])
-
-
Last edited: