• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Basic Equipment System

Status
Not open for further replies.
Level 2
Joined
Apr 10, 2021
Messages
16
How to make basic equipment system;

If player have a Armor (Can't pick more than 1)
If player have a Sword (Can't pick more than 1)
If player is archer (Can't pick Sword)
etc.
 
You can import Item Restriction System and then do the following:

The system is coded in plain JASS via ordinary means, so it should function properly in older patches.

Create these variables:
  • ItemType - Item-Type
  • ItemClass - String
  • HeroClass - String
  • Level - Integer
  • STR, AGI, INT - Integer
  • MeleeOrRange - Integer
  • Example
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet ItemType = Claws of Attack +15
      • Set VariableSet ItemClass = "Weapon"
      • Set VariableSet HeroClass = "Mountain King"
      • Set VariableSet Level = 10
      • Set VariableSet STR = 10
      • Set VariableSet AGI = 10
      • Set VariableSet INT = 10
      • -------- 0 for Both, 1 for Range Only, 2 for Melee Only --------
      • Set VariableSet MeleeOrRange = 1
      • Custom script: call IRS_ItemRegistration (udg_ItemType, udg_ItemClass, udg_HeroClass, udg_Level, udg_STR, udg_AGI, udg_INT, udg_MeleeOrRange)
 
Last edited:
you can also use item level. For example item level 1 = melee weapons, so if unit wants to pick an item, you check if it does not already have an item with level 1 and if yes, you prevent the unit from picking the new item.
Items by default allow levels between 0 and 8, but shift clicking the field allows you to paste in a custom value. I set it to 40 and the game also returned 40, so it should work for you.
 
Status
Not open for further replies.
Back
Top