HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

2 slotted dialog inventory system

05-02-2007, 11:35 PM#1
refl3ction
im currently working on a Inventory system for my rpg
that uses a dialog
that supports for 1 weapon piece and 1 armor piece

it starts off as a dialog that has 1 button (close)
and when you (the player) uses a item (weapon or armor piece) the item will be hidden and stored in a variable and a button will be created,
along with the effects added to the hero

clicking the button that was made will unequip the item

well my current dilemma is adding the effects of the item,
is there an easy way to do this instead of making a trigger for each armor/weapon used.

any help is appreciated,
thanks
05-03-2007, 02:19 AM#2
TheSecretArts
Um
Every .01 seconds
for each player in all players
if Armor[PlayerNumber] = x then give buff to Hero[PlayerNumber]
it would kinda work like that.
05-03-2007, 03:36 AM#3
Pyrogasm
Wow; no. Really. You can't add buffs like that, and adding the buff does not give the effect of the ability!

What you would want to do is this: Look at the object in the object editor and find out which abilities the item has. These are what give the 'effects' of an item (unless it's triggered).

When a unit acquires an item, you'd have to figure out which abilities were to be added based on which item was acquired. Vice versa for when a player drops an item.
05-03-2007, 05:13 AM#4
Zwan
You can use custom values to avoid mass triggers. You'll still need mass variables, but it will save some code lines.

Assign each item a cv and set your effects/abilities into an array on init matching the cv's you assigned and you can use a;

unit aquires an item
add ability/effect[cv of item being manipulated]
05-03-2007, 07:48 AM#5
blu_da_noob
You can also use item point value/level to store information such as that so that you don't need to give custom values at run time.
05-03-2007, 05:04 PM#6
Nosferatu
I have an idea that if it succeed will save u from lot of work.
Give to hero u wish to equip items ability based on hero inventory that can hold 2 items. Now when creating hero create 2 items that give no bonuses near him, store them to variable and issue him to pick them up(give item to hero wont work). So now whenever u want to equip some item u remove one of dummy items, drop item ure equiping on the ground and issue hero to pick it up. Also store that item to some variable. Now the item wont be visible and hero will still get bonuses from it cuz of second inventory ability. When u want to unequip that item just remove it and give to hero the same item(now use give item to hero). Again create dummy item near hero, store it to variable and issue him to pick it.
I've done something similar before and it worked for me...
05-03-2007, 08:02 PM#7
refl3ction
hey thanks guys,

ill try out your suggestions and come back if i need anything else :)