- Joined
- Mar 5, 2008
- Messages
- 3,887
Hello dear Hivers again 
I have made a little system that allows you to make greater item from two same weaker ones (like you have two Rings of Protection +1, and this system mades Ring of Protection +2 for your unit)
Main feature of this system is, that items of this kind doesn't take 2 invertory slots, but only 1.
The system works pretty well actually, the problem comes when there are two units on the map owned by same player, so if one unit have one Ring of Protection +1, and the second unit have also one Ring of Protection +1
the system will bug and will create Ring of Protection +2 for the second unit, and first unit will still have Ring of Protection +1 in it's invertory.
Do you know what i mean?
Edit I:
Oh, I forgot to mention... When you see Item [11]...Items are loaded in another trigger.
Thanks!
~Berz
I have made a little system that allows you to make greater item from two same weaker ones (like you have two Rings of Protection +1, and this system mades Ring of Protection +2 for your unit)
Main feature of this system is, that items of this kind doesn't take 2 invertory slots, but only 1.
The system works pretty well actually, the problem comes when there are two units on the map owned by same player, so if one unit have one Ring of Protection +1, and the second unit have also one Ring of Protection +1
the system will bug and will create Ring of Protection +2 for the second unit, and first unit will still have Ring of Protection +1 in it's invertory.
Do you know what i mean?
-
Ring of Protection
-
Events
-
Unit - A unit Acquires an item
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
-
Actions
-
Set Item_Owner[6] = (Triggering unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item_Owner[6] has an item of type Item[16]) Equal to True
-
-
Then - Actions
-
Set Item_Counter2[(Player number of (Owner of (Triggering unit)))] = (Item_Counter2[(Player number of (Owner of (Triggering unit)))] + 1)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Item_Counter2[(Player number of (Owner of (Triggering unit)))] Equal to 2
-
-
Then - Actions
-
Set Item_Counter2[(Player number of (Owner of (Triggering unit)))] = 0
-
For each (Integer A) from 1 to 2, do (Actions)
-
Loop - Actions
-
Item - Remove (Item carried by Item_Owner[6] of type Item[16])
-
-
-
Hero - Create Item[17] and give it to Item_Owner[6]
-
Special Effect - Create a special effect attached to the origin of Item_Owner[6] using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
-
-
Ring of Protection Drop
-
Events
-
Unit - A unit Loses an item
-
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to Item[16]
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Item_Counter2[(Player number of (Owner of (Triggering unit)))] Equal to 1
-
-
Then - Actions
-
Set Item_Counter2[(Player number of (Owner of (Triggering unit)))] = (Item_Counter2[(Player number of (Owner of (Triggering unit)))] - 1)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Item_Counter2[(Player number of (Owner of (Triggering unit)))] Equal to 0
-
-
Then - Actions
-
Set Item_Counter2[(Player number of (Owner of (Triggering unit)))] = 0
-
-
Else - Actions
-
-
-
Edit I:
Oh, I forgot to mention... When you see Item [11]...Items are loaded in another trigger.
Thanks!
~Berz