Hey
Im doing this in GUI because I thought it would be simple, and because I tried it in jass, and because I suck at jass, failed.
In the RPG that I am making, I made it so if you pick up, the item, you get an attachment. (through the object editor).
Since it is totally unrealistic to have like 4 attachments, OR to have it say "you can only carry one sword at a time" or something like that, I wanted it to be so if you click the item, it enables/disables it, shows a BTN/DISBTN, the tooltip/"Click to enable this item". That was fairly simple. Then I wanted it to only let you have 1 enabled at a time, or if you click a disabled item, and another is enabled already, it switch for you without having to disable the other one first. (if i worded it right). That resulted in a long string of triggers that confused me and probly confuse you too. So heres the original and what I got so far, any simple way to do what I wrote this whole noobish paragraph about?
lol
I hope u can help
EDIT: Another note: THIS DOES WORK. Im asking for help to make it do the extra features I wanted.
EDIT2: should I just post the Jass I made so far and have you help me with it?
Im doing this in GUI because I thought it would be simple, and because I tried it in jass, and because I suck at jass, failed.
In the RPG that I am making, I made it so if you pick up, the item, you get an attachment. (through the object editor).
Since it is totally unrealistic to have like 4 attachments, OR to have it say "you can only carry one sword at a time" or something like that, I wanted it to be so if you click the item, it enables/disables it, shows a BTN/DISBTN, the tooltip/"Click to enable this item". That was fairly simple. Then I wanted it to only let you have 1 enabled at a time, or if you click a disabled item, and another is enabled already, it switch for you without having to disable the other one first. (if i worded it right). That resulted in a long string of triggers that confused me and probly confuse you too. So heres the original and what I got so far, any simple way to do what I wrote this whole noobish paragraph about?
-
init vars
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set ItemTypes[1] = Spear
-
Set ItemTypes[2] = Spear
-
Set ItemTypes[3] = Long Sword
-
Set ItemTypes[4] = Long Sword
-
Set ItemTypes[5] = Short Sword
-
Set ItemTypes[6] = Short Sword
-
Set ItemTypes[7] = Morning Star
-
Set ItemTypes[8] = Morning Star
-
Set ItemTypes[9] = Spell Axe
-
Set ItemTypes[10] = Spell Axe
-
Set ItemTypes[11] = Quarter Staff
-
Set ItemTypes[12] = Quarter Staff
-
Set NumberOfItemTypes = 12
-
-
-
item
-
Events
-
Unit - A unit Uses an item
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to NumberOfItemTypes, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item-type of (Item being manipulated)) Equal to ItemTypes[(Integer A)]
-
-
Then - Actions
-
Set ItemTypeNumber[(Player number of (Triggering player))] = (Integer A)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ItemTypeNumber[(Player number of (Triggering player))] Not equal to 0
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(ItemTypeNumber[(Player number of (Triggering player))] mod 2) Equal to 0
-
-
Then - Actions
-
Item - Remove (Item being manipulated)
-
Hero - Create ItemTypes[(ItemTypeNumber[(Player number of (Triggering player))] - 1)] and give it to (Triggering unit)
-
-
Else - Actions
-
Item - Remove (Item being manipulated)
-
Hero - Create ItemTypes[(ItemTypeNumber[(Player number of (Triggering player))] + 1)] and give it to (Triggering unit)
-
-
-
Set ItemTypeNumber[(Player number of (Triggering player))] = 0
-
-
Else - Actions
-
-
-
-
-
lol
EDIT: Another note: THIS DOES WORK. Im asking for help to make it do the extra features I wanted.
EDIT2: should I just post the Jass I made so far and have you help me with it?