🏆 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!
I'm making a shooter kind of map and i want to make a unit only have 1 type of item:
Example: A unit can only have 1 Potion of healing item at once and cant have 2.
How do i do that ? do i have to create a trigger for that ?
Event: Unit aquires item
Condition: Check for your itemType
Actions:
Use the ForEachInteger function to loop from 1-6:
Set tmpItem = Item Carried By TriggeringUnit in Slot[LoopIndex]
Then check if ItemTypeOf(tmpItem) == yourItemType AND tmpItem != ItemBeingManipulated.
If both are true, then drop ItemBeingManipulated from unit.
No. You have to put an IfThenElse into your loop, after you Set your tempItem.
Add the two conditions I mentioned in my post before.
In Then - Actions part you order unit to drop item. Finished.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.