Classification
Moderator: Cheaters
Classification
How do u make Classification? like if i have sword 1 sword 2 and sword 3, if i equip sword 1 i cant equip sword 2 or 3?
-
- Honorary wc3edit.net Traitor
- Posts: 468
- Joined: December 10th, 2007, 10:50 pm
- Title: The Professional
- Location: USA
- Contact:
Re: Classification
Make it so that whenever you try to pick up an item, but the condition says that if unit has item 1 equipped, then it drops item 2 and 3. Something like that.
If you need help, I'll design something in gui for you.
If you need help, I'll design something in gui for you.
Do you support Durchdringen? If so, add the spoiler to your sig. Durch cares for you, so show your support for Durch!
Spoiler:
- Aero
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Classification
When you design your custom items, categorize them.
ie: Weapons --> Permanent
Armor --> Artifact
Then in your trigger; let's say your unit picks up a sword.
You would loop through his inventory to see if he is holding an item of classification permanent (Besides the item justed picked up) and if the unit DOES have one, then you know he has a sword...then you just make the unit drop the item.
Alternatively, if there is a large diversity amongst items (Shields, Sword, Ring, Earring, Necklace... ect.) then you can either do giant if checks (Terribly unefficient) or there's a few systems you can use like dummy color codes, item life ect.
ie: Weapons --> Permanent
Armor --> Artifact
Then in your trigger; let's say your unit picks up a sword.
You would loop through his inventory to see if he is holding an item of classification permanent (Besides the item justed picked up) and if the unit DOES have one, then you know he has a sword...then you just make the unit drop the item.
Alternatively, if there is a large diversity amongst items (Shields, Sword, Ring, Earring, Necklace... ect.) then you can either do giant if checks (Terribly unefficient) or there's a few systems you can use like dummy color codes, item life ect.
-
- Forum Staff
- Posts: 506
- Joined: August 5th, 2007, 1:38 pm
- Title: Gui Expert
- Location: *Unknown*
Re: Classification
You could also do some triggers for when they aquire these item, hope these triggers set u on the right path.
Event:
-unit aquires an item
Condition:
-None
Action:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item being manipulated)) Equal to Sword 1
(((Item carried by (Triggering unit) of type Sword 2) is owned) Equal to True) or (((Item carried by (Triggering unit) of type Sword 3) is owned) Equal to True)
Then - Actions
Hero - Drop (Item being manipulated) from (Triggering unit)
Else - Actions
Do nothing
Event:
-unit aquires an item
Condition:
-None
Action:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item being manipulated)) Equal to Sword 1
(((Item carried by (Triggering unit) of type Sword 2) is owned) Equal to True) or (((Item carried by (Triggering unit) of type Sword 3) is owned) Equal to True)
Then - Actions
Hero - Drop (Item being manipulated) from (Triggering unit)
Else - Actions
Do nothing