PDA

View Full Version : Items Help


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.

Zipsco
07-27-2006, 6:55 AM
Yes there is::: (last question) create a visibility modified square/circle whatever, at place where you want BLACK MASK, emitting black mask. Something like that, the same you use when you make some place visible.

Other than that, i don't remember if game cache saves persist after game reboots, maybe - maybe not. Anyway save the players items in the game cache, insteed of teleporting them away, also iam not quite sure if i get the first part of, this is a weapon but you got a weapon i will remove it, if this is like, you classifie all your items as weapons, chestplate, glowes, then you will need to make an inventory system consisting of many triggers, but if thats what you want, then write a reply, and ill reply to that :)

Eternal255
07-27-2006, 2:10 PM
yea thats kinda the idea. Except the only items i want to be used are Weapons and Armors, nothing too complicated ^^