• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Handling Right Click or Left Click On items ?

Status
Not open for further replies.
Level 25
Joined
Jul 10, 2006
Messages
3,315
Get the Right Click Recipe system from my signature, it has a double-right-click disassemble feature.

To make it require 4 clicks, you need to add a timer to the trigger.

If the time remaining on the timer is equal to 0, start the timer (1 sec or so should be fine). Then on the next activation if there is more than 0 time remaining, continue with the disassemble.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Changing the inventory slot of an item fires an order event. To achieve what you want you have to listen to two of such order events in a row that put the item in the same slot as it was before.


Add this event to the trigger:
JASS:
call TriggerRegisterUnitEvent( trigger, unit, EVENT_PLAYER_UNIT_ISSUED_UNIT_ORDER)

Here are the order ID's for the 6 slots:
_____________
|852002|852003|
|852004|852005|
|852006|852007|
----------------
 
Status
Not open for further replies.
Top