Hm this inventory system seems harder and longer to fix than to build a custom one -.-
I think that I can't use your solution, I am trying to prevent the use of an item in some areas. And so I can't know if the target is in this area only when the item is already used to get the target point.
To reset the cooldown of an item, I can quite "easily" delete the item then create a new one instead, but to activate the cooldown, I think that I can't as the ability of the item has a target point ?
there is a trigger action to set the "cooldown of an ability for unit". the the cooldown link location is set to unit it should work.
btw you can validate the target point, there is a validator for that, you can either place dummy units and use an anum area validator etc. endless possibilities.
Rollback Post to RevisionRollBack
i deleted my old skype, contact me for new one. I am for hire now! My Legacy - All of my maps as open source
You can do this by altering the stats if the ability with a Catalog Field Value Set action. This will change the cooldown for the ability for the player. If you wan't to increase it only once/add aditional cooldown, you can use the Add Cooldown For Unit Ability which will have you choose a cooldown ID (set in the Info+ Cost field of the ability), the Ability and the taget unit.
Disable the ability for the unit temporarily:
You can either do this with a trigger, with the Enable/Disable Ability For Unit or use a Requirement which requires an upgrade (just create an upgrade which does nothing -> set the requirement for the Ability to that -> have a trigger use the Set Upgrade Level For Player and set it to either 1 (the requirement will return true) or 0 (the requirement will return false).
Thanks Demtrod, but it is the ability of an item.
So if I did nothing wrong during my tests, the ability of the item doesn't trigger the event "ability used" in a trigger. So I can't stop it before to be fully done. If I use the event "item used", the ability is fully done and can't be stopped.
So I tried to use a dummy ability, then test if I should allow the real ability (so start the real ability) if it doesn't target a certain area. But then I have troubles with the cooldown of the item, which is triggered during the dummy ability. According to my test, I can't reset the cooldown of an item : I tried to rest it indicating the item itself as an unit or the unit bearing it, without any success.
FunkyUserName, thanks for your solution. I guess that it is the only way to do it. I miss the lack of terrain texture, buildable, and several other validator possibilities. But I have to admit that there is already a big list in the validators types. Annoying to have to go with such an inelegant and unaccurate solution...
I want to prevent the use of an item if it targets a certain area of the map.
But I think that FunkyUserName has given me the only way to do it : putting dummy units, and checking the number of dummy units close in a validator. Which is bad because unaccurate mainly, but it does the job ^^