Equip/Unequip Items, Spells, and Weapons
 Posted: Fri Jan 07, 2011 5:06 pm
Posted: Fri Jan 07, 2011 5:06 pmBeen a while since I've paid a visit to the forums, but I've been working on the sprites and such for my game. I've got another question/dilemma that I thought of though. 
While working with the Blender 2.49 game engine, i was able to easily create the ability to equip and remove items, spells, and weaponry by using states. This way, for example, you could only use a particular spell if it was equipped to your character at the time - you would have to return to inventory menu if you desired to equip and use a different spell.
I've tried a few things here and there but nothing seems to really work in GE that I know of (but I'm very new to actual coding. With the BGE I just used logic bricks). So if someone could explain, provide a zip file, or link me to a tutorial that does the following things, that would be very helpful:
- create an inventory menu that scrolls down over your camera view from the top view while suspending the main game
- any collected items and spells will be located in your inventory
- upon clicking on an inventory item/spell, you may choose to "discard" or "equip" or "cancel" .
- if you equip the inventory item, it replaces whatever was equipped before and its avatar (say a potion) will appear in a small box in the lower right-hand corner, letting you know that it is equipped.
- Only when an item is equipped may it be used
I can handle the other things (like how the item functions, limiting the number of items your inventory can hold, etc), I'm just having a hard time coming up with a simple way to do all of this. Any help you can offer me will be greatly appreciated. Hopefully I'll be able to get around to the real game-making some time soon, letting me implement all of this knowledge you guys have helped me gain so far!
Sincerely,
BlenderFreak
			While working with the Blender 2.49 game engine, i was able to easily create the ability to equip and remove items, spells, and weaponry by using states. This way, for example, you could only use a particular spell if it was equipped to your character at the time - you would have to return to inventory menu if you desired to equip and use a different spell.
I've tried a few things here and there but nothing seems to really work in GE that I know of (but I'm very new to actual coding. With the BGE I just used logic bricks). So if someone could explain, provide a zip file, or link me to a tutorial that does the following things, that would be very helpful:
- create an inventory menu that scrolls down over your camera view from the top view while suspending the main game
- any collected items and spells will be located in your inventory
- upon clicking on an inventory item/spell, you may choose to "discard" or "equip" or "cancel" .
- if you equip the inventory item, it replaces whatever was equipped before and its avatar (say a potion) will appear in a small box in the lower right-hand corner, letting you know that it is equipped.
- Only when an item is equipped may it be used
I can handle the other things (like how the item functions, limiting the number of items your inventory can hold, etc), I'm just having a hard time coming up with a simple way to do all of this. Any help you can offer me will be greatly appreciated. Hopefully I'll be able to get around to the real game-making some time soon, letting me implement all of this knowledge you guys have helped me gain so far!
Sincerely,
BlenderFreak
 Thanks for all the help and advice you've been giving me!
 Thanks for all the help and advice you've been giving me!