HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hard time with items and triggers

08-25-2003, 04:04 AM#1
Roderick
I'm making a RPG map, and have also made items wich represent weapons. The only problem is that I can't make a hero to have only two weapons as a max.

I've made a trigger wich goes something like this

E:
Hero aquires an item
C:
Item class of (Item being manipulated) equal to Artifact
IntVar leser than 2
A:
Set IntVar = IntVar+1

E:
Hero acquires an item
C:
Item class of... (same as above)
IntVar equal to 2
A:
Drop (Item being banipulated) from (Hero manipulating item)

It seems perfect, but somehow doesn't work. Please help me
08-25-2003, 04:22 AM#2
Mech_1000
What if you set the items to be in an item group, and have a variable for how many of those items they are holding, when they aquier one of those items in that group, it adds one to that variable, when the variable is 2, thats the max, but if they aquier one more of those, it will set it to 3, and force the player to drop last aquiered item if it sets the variable to 3, then when they drop that type of item, subtract one from that variable. There probably is an easier way, but i dont know how.

GL
08-25-2003, 04:25 AM#3
Draco
Try it like this....

EVENT - Hero aquires an item

CONDITION - Only use this if it's for a certain hero/player

ACTIONS

IF/THEN/ELSE - IF IntVar less than 2, THEN do set Variable IntVar to (IntVar+1), ELSE drop (picked up item) from (Triggering unit)