Can I not allow items?

Ex0sphere

New Member
Reaction score
1
How do I make it so when I have a certain item, and i try to buy the another certain item, it has a message that says only one weapon at a time, and it doesn't let u buy the item.
 

Light Alkmst

New Member
Reaction score
20
create a trigger so that whenever a unit buys or picks up an item, check its inventory for any items you would classify as a weapon. (will need hardcoding for item ID's) if an item is already present, remove either of the items (depends on what you want) and print the text, and refund whatever costs were paid
 

LurkerAspect

Now officially a Super Lurker
Reaction score
118
It would look something like this:
Code:
Events
    Unit buys an item
Conditions
     Item type equal to (ur item here)
Actions
     If item count of (triggering unit) of type (ur item here) > 1 then
           Remove (item being manipulated) from (triggering unit)
           Game: Display message "you cannot have more than one item of this type"
           Player: Set (owner of (triggering unit)'s) current gold to (player (owner of (triggering unit)'s) current gold + (cost of item))
     Else
          Do Nothing

I don't have WE open, so I kinda just winged this :) but you should get the general idea
 

Panda

New Member
Reaction score
3
For checking the item class you could just set the item level of all weapons to for example 20.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top