wc3edit.net

United Warcraft 3 map hacking!
It is currently April 28th, 2024, 8:23 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Classification
PostPosted: February 21st, 2008, 5:51 pm 
Offline
Senior Member
User avatar

Joined: January 25th, 2008, 5:23 pm
Posts: 197
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?


Top
 Profile  
 
 Post subject: Re: Classification
PostPosted: February 21st, 2008, 6:01 pm 
Offline
Honorary wc3edit.net Traitor
User avatar

Joined: December 10th, 2007, 10:50 pm
Posts: 468
Location: USA
Title: The Professional
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.

_________________
Do you support Durchdringen? If so, add the spoiler to your sig. Durch cares for you, so show your support for Durch!

Spoiler:
(broken image) Thanks for the support!


Top
 Profile  
 
 Post subject: Re: Classification
PostPosted: February 21st, 2008, 9:24 pm 
Offline
Forum Staff
User avatar

Joined: January 28th, 2007, 8:10 pm
Posts: 830
Location: Canada
Title: JASS Programmer
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.


Top
 Profile  
 
 Post subject: Re: Classification
PostPosted: February 23rd, 2008, 5:35 am 
Offline
Forum Staff
User avatar

Joined: August 5th, 2007, 1:38 pm
Posts: 507
Location: *Unknown*
Title: Gui Expert
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)