• 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.

[Solved] Virtual Cooldown?

Status
Not open for further replies.
how i can make virtual cooldown?
example: i buy item "Boots of Speed", here i want the virtual cooldown with triggers and MUI.

This item expires after 30 seconds. (virtual cooldown should have the same, 30 seconds.)

when I try to buy back leave a message "you can not buy fast again the same item"

(you can only buy another if the former has expired.)

I hope you can help me please :goblin_cry:
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
why not just putting 30 seconds cooldown in the shop and stock to one? :D

you could do it with SimError library(in Case you use vJass, in case you dont, you can still make it with Jass code or custom code but that would be a bit harder

Just detect when unit buys item from shop and then check if he already owns this item, if not remove the item from game, give money back to the user(you need to cache this, there is no normal native for that) and increase the stock(dont know if that is possible) and you print error with SimError code
 
Status
Not open for further replies.
Top