Data Realms Fan Forums http://45.55.195.193/ |
|
Creating a framework for inventory item combination http://45.55.195.193/viewtopic.php?f=75&t=31735 |
Page 1 of 1 |
Author: | Djinn [ Fri Sep 28, 2012 2:38 pm ] |
Post subject: | Creating a framework for inventory item combination |
Another request from me, but I'm at work and can't get access to CC from here so I thought I'd ask someone else to take a crack at it - what I'm looking at is a code attached to a held item (HDFireArm or whatever) that will scan through inventory to see if it finds a specific item, and if it does it deletes that item as well as the gun and adds a "combined" item to the inventory. It doesn't matter what the three items are as long as the framework works - so something like a pistol activating the effect to find a grenade which ends by giving you a Blue Bomb would work. In the little bit I've been researching this, I've seen functions that look through your inventory as well as functions to add things to your inventory, but not one that deletes them. So pretty much: A) Is it possible and B) Could someone make a quick proof of concept for me? |
Author: | Azukki [ Fri Sep 28, 2012 6:19 pm ] |
Post subject: | Re: Creating a framework for inventory item combination |
Take a look at the ammo system in shadow echelon. You basically just need to modify it so instead of changing the second device's (gun, first device is the ammo box) sharpness, it deletes it and adds the third device (combined result) to the actor's inventory. These replacements and such will 'repair' the gun/s, though. I think it's theoretically possible to avoid that, but it'd be a huge pain in the rear. If you need help with adapting it to your purposes, I can, but if you do know some Lua, I'd like you to take a crack at it first. PM me if you want help and I forget to ever check this thread again. viewtopic.php?p=457882#p457882 Version 2 of this may be simpler because it has less stuff you don't want, or it might not be relevant at all, I forget. |
Author: | Djinn [ Fri Sep 28, 2012 7:23 pm ] |
Post subject: | Re: Creating a framework for inventory item combination |
Amazing, it sounds perfect. Ill take it apart and let you know if I need anything but its sounds like exactly the system I'm looking for. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |