View unanswered posts | View active topics It is currently Thu Oct 24, 2019 12:46 am



Reply to topic  [ 3 posts ] 
 Creating a framework for inventory item combination 
Author Message
User avatar

Joined: Sun Oct 29, 2006 4:26 am
Posts: 298
Reply with quote
Post 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?


Fri Sep 28, 2012 2:38 pm
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post 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.


Fri Sep 28, 2012 6:19 pm
Profile
User avatar

Joined: Sun Oct 29, 2006 4:26 am
Posts: 298
Reply with quote
Post 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.


Fri Sep 28, 2012 7:23 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.021s | 13 Queries | GZIP : Off ]