HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

2 Items of Same Type but not 3 on a hero.

07-16-2004, 09:28 PM#1
KurupteD.
Help, I want to modify the imagica rpg's item system where they use the orbs, ive copied the trigger and want to use it in my map, if any of u are familiar with it, it allows you to pick up an orb, but u cant pick up the same orb, or grab another orb of any kind, Ive already disabled duplicate items, now I want to allow my hero to be able to pick up 2 orbs of the same item type (ie; artifact, permanent, purchasable) and be able to have them in his inventory, but if he tries to pick up a 3rd orb which is the (artifact) class, he wont be able to, if any of u can help me with this it would be greatly appreciated.
07-16-2004, 11:29 PM#2
johnfn
gtg soon, sorry if rushed...

Variables
numOrbs
Events
a hero picks up an item
actions:
for each integer a from 1 to 6

if item in slot (integer a) equal to (no3ofthisitem) then
numOrbs = numOrbs + 1
end if

if numOrbs Greater than 3 then Drop (manipulated item)

If you want more types of orbs, have more Orb variables and then add one to the type of orb and then at the end check for each type of orb.

Hope that was helpful; I gtg.