Eternal255
07-27-2006, 3:29 AM
Uh heya, didnt know what to title this and ill try to explain it as best as i can.
I want heros to only be able to carry 1 weapon-type item in their inventory at any given time, so i made a location where their extra weapons can be transported to when/if they pick up anotehr weapon-type item.
Now thats where my question lies, the weapon-type items in my map are either Artifact or Permanant Class. (Artifacts are rares and permanant are commons).
An example of what i want to happen: Hero 1 picks up a weapon. Later hero 1 finds another weapon and picks it up however since he already had a weapon, the new weapon is moved to his "inventory location" so he doesnt get bonuses of both items.
I have a trigger that uses variable to do this, however when u save/load and stuff, well the trigger gets kinda screwed up and stuff sometimes. (havnt tested with recent adjustments)
Ill post what i have:
Weapons P1 Copy
Events
Unit - A unit owned by Player 1 (Red) Acquires an item
Conditions
((Item-class of (Item being manipulated)) Equal to Artifact) or ((Item-class of (Item being manipulated)) Equal to Permanent)
Actions
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Item-class of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Permanent) or ((Item-class of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Artifact)
Then - Actions
Set P1 = (P1 + 1)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
P1 Greater than or equal to 2
Then - Actions
Hero - Drop (Item being manipulated) from (Triggering unit)
Item - Move (Last dropped item) to (Random point in Inventory Player 1 <gen>)
Else - Actions
Do nothing
Set P1 = 0
If someone can come up with something simpler, please let me know
Also: This is not item-related but rather vision related. Is there a way to return the vision state of an area u previously visited back to normal? And by normal i mean back to complete black, and not that fog thing or whatever its called.
I want heros to only be able to carry 1 weapon-type item in their inventory at any given time, so i made a location where their extra weapons can be transported to when/if they pick up anotehr weapon-type item.
Now thats where my question lies, the weapon-type items in my map are either Artifact or Permanant Class. (Artifacts are rares and permanant are commons).
An example of what i want to happen: Hero 1 picks up a weapon. Later hero 1 finds another weapon and picks it up however since he already had a weapon, the new weapon is moved to his "inventory location" so he doesnt get bonuses of both items.
I have a trigger that uses variable to do this, however when u save/load and stuff, well the trigger gets kinda screwed up and stuff sometimes. (havnt tested with recent adjustments)
Ill post what i have:
Weapons P1 Copy
Events
Unit - A unit owned by Player 1 (Red) Acquires an item
Conditions
((Item-class of (Item being manipulated)) Equal to Artifact) or ((Item-class of (Item being manipulated)) Equal to Permanent)
Actions
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Item-class of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Permanent) or ((Item-class of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Artifact)
Then - Actions
Set P1 = (P1 + 1)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
P1 Greater than or equal to 2
Then - Actions
Hero - Drop (Item being manipulated) from (Triggering unit)
Item - Move (Last dropped item) to (Random point in Inventory Player 1 <gen>)
Else - Actions
Do nothing
Set P1 = 0
If someone can come up with something simpler, please let me know
Also: This is not item-related but rather vision related. Is there a way to return the vision state of an area u previously visited back to normal? And by normal i mean back to complete black, and not that fog thing or whatever its called.