• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Unit drop item trigger run multiple times

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
its running around 10 times, what is the best solution for avoid the multiple running? make item array and check if last picked item was same then manipulated item?
or wait 0.00?

what is the easiest and best way?

[edit] i cant use trigger sleep / wait because i used condition part :/ in action function is work well, so why condition running multiple times and action only 1x if i drop only 1 item?
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
its running around 10 times, what is the best solution for avoid the multiple running? make item array and check if last picked item was same then manipulated item?
or wait 0.00?

what is the easiest and best way?

[edit] i cant use trigger sleep / wait because i used condition part :/ in action function is work well, so why condition running multiple times and action only 1x if i drop only 1 item?
I would just turn the trigger off when it starts and back on when it ends.
For the item dropping you shouldn't order the unit to drop it(can be cancelled), instead you should just move the item to position of unit.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
i always turned trigger off made a timer w .01 seconds. when tht timer ends turn trigger back on.

doing what u said and making a global storing the item id might work if u add it as condition. only problem is if someone else gets same item im not sure if it would fail or not

i must use action function i guess, problem is, i make item hide/show, item ownership conditions, if it is visible and not owned then add to a array, but if i check in condition then it is allways return with hidden even it was in inventory, so i guess i must use wait 1 sec in action trigger and check the item ownership/visibility only after wait


even if i turn off the problem remain with visibility and ownership
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
i must use action function i guess, problem is, i make item hide/show, item ownership conditions, if it is visible and not owned then add to a array, but if i check in condition then it is allways return with hidden even it was in inventory, so i guess i must use wait 1 sec in action trigger and check the item ownership/visibility only after wait


even if i turn off the problem remain with visibility and ownership

I would use a hashtable and save the status of each item in there. That way the only possible mistakes would be mine.
AKA, trigger the whole thing.
 
Status
Not open for further replies.
Top