• 🏆 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!

help with triggers please

Status
Not open for further replies.
Level 3
Joined
Sep 29, 2004
Messages
44
Im trying to make it so your hero can only hold 1 item of a certain type i.e 1 sword, 1 shield, 1 helmet, and 1 armor, can anyone help me out with how to do this thanks in advance.
 
Level 9
Joined
Sep 8, 2004
Messages
633
Events:
unit - a unit aquires an item

Conditions:
Item type of (aquired item) = (item X)

Actions:
If/then/else:
If (triggering unit) has two items of item type (item X)
Then Item - move (aquired item) instantly to location Y

Goodluck
 
Level 3
Joined
Oct 21, 2004
Messages
72
Is there a way to do a check on the player before buying the item? That way the item doesn't have to be bought then dropped thus wasting gold?

Iunno... is there a way to do some mix and match of variables and when item is acquired X is set to 1 and if X=1 when attempting to acquire the same item again, it brings up a unique error message?


Edit:

Nevermind.. you can just have the item be removed from game instead of dropped (or dropped then removed from game) and refund the money.

More triggers, but it gives the same effect.
 
Status
Not open for further replies.
Top