• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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