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

Help needed on an Item Combination system

Status
Not open for further replies.
Level 4
Joined
May 20, 2006
Messages
43
Alright, I need help on a system.
I've tried but failed, on my own, and I'm not good at JASS nor GUI, so comments would be appreciated.

The plan is to create a system which does the following:


Unit uses ability 'Combine':
Checks if Unit has item 'A001'
Checks if Unit has item 'A002'
[and needs to be able to have more than 1 combo set]

If true:
Remove item 'A001' from unit
Remove item 'A002' from unit
Create item 'A003' on unit
Display text "Item Created"

If false:
Do nothing.

For purposes of things, I'd appreciate it if you put comments into the coding.
For the sake of simplicity, the unit which creates the item would be 'hbla' but it should just be able to check depending on the triggering unit who casts the ability, if i'm not mistaken.

Thanks in advance.

P.S. I don't need to combine items with charges for now, and the simpler the coding the better.
 
Level 6
Joined
May 13, 2005
Messages
164
[and needs to be able to have more than 1 combo set]

I dont get what you meant by this but here's the trigger without my understanding of that statement.



Create Item
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Combine
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Casting unit) has an item of type A001) Equal to True
((Casting unit) has an item of type A002) Equal to True
Then - Actions
Hero - Create A003 and give it to (Casting unit)
Game - Display to (Player group((Owner of (Casting unit)))) for 5.00 seconds the text: Item Created.
Item - Remove (Item carried by (Casting unit) of type A001)
Item - Remove (Item carried by (Casting unit) of type A002)
Else - Actions
Do nothing
 
Level 4
Joined
May 20, 2006
Messages
43
LeviathanReborn said:
[and needs to be able to have more than 1 combo set]

I dont get what you meant by this but here's the trigger without my understanding of that statement.



Create Item
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Combine
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Casting unit) has an item of type A001) Equal to True
((Casting unit) has an item of type A002) Equal to True
Then - Actions
Hero - Create A003 and give it to (Casting unit)
Game - Display to (Player group((Owner of (Casting unit)))) for 5.00 seconds the text: Item Created.
Item - Remove (Item carried by (Casting unit) of type A001)
Item - Remove (Item carried by (Casting unit) of type A002)
Else - Actions
Do nothing
Nice.
Do you mind converting this to custom text?
I'm having troubles finding some of the commands since i'm still new to GUI.where to find things?
 
Status
Not open for further replies.
Top