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

GUI Equipment System

V2.

V2.

Level 3
Joined
Mar 24, 2007
Messages
20
Equipment System

Well ive seen that allot of RPG and ORPGs don't have any equipment system and i want to change this...

There are many ways to make your own equipment system, allot of people just steal someone elces work I don't like this its like lieing but in trigger from...

In this tutorial there are many ways to make an equipment system, one of them is with variables another is with a second unit doing all the work for you....

Unit stored equipment system

The first system that i will run through you with requires allmost no knowlage of triggers and is VERY SIMPLE.

To start this system is basicly a unit holding another units items for them we will get the unit varibles set up as well as the unit variables...

Unit+Variable Set up
Get a hero any hero place him on the map or if you want to make your hero later through triggers or training make a variable array of type unit and call it hero for later reference. once you do that you will need to copy any building, lets say a farm remove everything from it its shadow change its model to be None.mdl(by going down to the custom path) and call it what ever you want)this is where the items are going to be stored so make it what ever you want... then once you have placed that make another variable of a unit array and call it Equipment. Once you have placed both units on the map(the hero dosent need to be placed).

EDIT: You will need to give the farm the abillity Inventory(hero) or remake the abillity to have the amount of slots you want...

Item+Abillity Set up
Make an item from the abillity Item Mana Regain and call it Item Equip remove the cooldown, mana points gained, cooldown and caster art. If you have allready made your items give all of the items you want to equip the ability Item Equip and remove all of the other abilitys and make them all activly used.

You will need an abillity to contact your inventory you can use an item abillity or a normal abillity but your gonna need one i use an abillity called inventory and i made it from thunderclap and just took away all of the damage and stun duration you can use what ever you want though...

One problem with this system is you will need to make a abillity for every item (just copy the item abillity that you want to affect the hero when it is equiped and call it the same name of your item for reference)

Triggers

First the set up... in you map initization set Equip 1 to player 1 equipment unit and so on depending on how many players there are... you will also need to set the hero variable to the players heros...

red(1),blue(2),teal(3),purple(4)...for the arrays this is critical that you set it right so the equip array 1 is for player 1 red and 2 is for player 2 blue and so on!

Now your gonna need to start the triggering, make a trigger and call it Equip...
Triggers

First the set up... in you map initization set Equip 1 to player 1 equipment unit and so on depending on how many players there are... you will also need to set the hero variable to the players heros...

red(1),blue(2),teal(3),purple(4)...for the arrays this is critical that you set it right so the equip array 1 is for player 1 red and 2 is for player 2 blue and so on!

Now your gonna need to start the triggering, make a trigger and call it Equip...

  • Events
    • Unit - A unit Uses an item
  • Conditions
    • ((Hero manipulating item) is A Structure) Equal to True
  • Action
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Item-type of (Item being manipulated)) Not equal to (Item-type of (Item carried by Equipment[(Player number of (Owner of (Triggering unit)))] of type Item 1))) and (((Item-type of (Item being manipulated)) Equal to Item 1)
    • Then - Actions
      • Item - Remove (Item being manipulated)
      • Hero - Create Item and give it to Hero[(Player number of (Owner of (Triggering unit)))]
      • Unit - Remove Item 1 (+6 to Attack) from Hero[(Player number of (Owner of (Triggering unit)))]
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Item-type of (Item being manipulated)) Not equal to (Item-type of (Item carried by Equipment[(Player number of (Owner of (Triggering unit)))] of type Item 2))) and (((Item-type of (Item being manipulated)) Equal to Item 2)
    • Then - Actions
      • Item - Remove (Item being manipulated)
      • Hero - Create Item and give it to Hero[(Player number of (Owner of (Triggering unit)))]
      • Unit - Remove Item 2 (+2 to Armor) from Hero[(Player number of (Owner of (Triggering unit)))]
    • Else - Actions
Thats your equip variable very simple but very effective, now your gonna need to make another variable for the unequip...

  • Events
    • Unit - A unit Uses an item
  • Conditions
    • ((Hero manipulating item) is A Hero) Equal to True
  • Action
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Item-type of (Item being manipulated)) Not equal to (Item-type of (Item carried by Equipment[(Player number of (Owner of (Triggering unit)))] of type Item 1))) and (((Item-type of (Item being manipulated)) Equal to Item 1)
    • Then - Actions
      • Item - Remove (Item being manipulated)
      • Hero - Create Item and give it to Equipment[(Player number of (Owner of (Triggering unit)))]
      • Unit - Add Item 1 (+6 to Attack) to (Triggering unit)
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Item-type of (Item being manipulated)) Not equal to (Item-type of (Item carried by Equipment[(Player number of (Owner of (Triggering unit)))] of type Item 2))) and (((Item-type of (Item being manipulated)) Equal to Item 2)
    • Then - Actions
      • Item - Remove (Item being manipulated)
      • Hero - Create Item and give it to Equipment[(Player number of (Owner of (Triggering unit)))]
      • Unit - Add Item 2 (+2 to Armor) to (Triggering unit)
    • Else - Actions
thats your 2 main triggers there done... (although you need to make a trigger or a way to select your inventory...)

EDIT:Ok remade the map....
 

Attachments

  • Equip System.w3x
    21.3 KB · Views: 131
Last edited:
Level 16
Joined
Oct 30, 2004
Messages
1,277
V2. said:
One problem with this system is you will need to make a abillity for every item (just copy the item abillity that you want to affect the hero when it is equiped and call it the same name of your item for reference)

This tutorial requires a lot of useless work and this storage system could be made much more easily.
This seems like an addon and one would assume that if a person knows how to do an equipment system he would know how to do a simple storage.
Your explaining is jumpy and not informative. It can be confusive at times.

I dont see this tutorial being helpfull for anyone. I would recommend graveyarding this.
 
Top