Data Realms Fan Forums
http://forums.datarealms.com/

Removing items a units inventory with lua
http://forums.datarealms.com/viewtopic.php?f=73&t=18038
Page 1 of 1

Author:  fylth [ Sat Mar 06, 2010 11:41 am ]
Post subject:  Removing items a units inventory with lua

Just a quick question, is it possible to add an item to an actor and then have it automatically removed using lua? If so I have a great idea for a mod haha

Author:  Azukki [ Sat Mar 06, 2010 12:19 pm ]
Post subject:  Re: Removing items a units inventory with lua

Any particular reason you need him to hold the device and then drop it?

Might spawning the device right next to the actor work just as well?

Author:  411570N3 [ Sat Mar 06, 2010 12:31 pm ]
Post subject:  Re: Removing items a units inventory with lua

Disarming ray?

Author:  fylth [ Sat Mar 06, 2010 12:33 pm ]
Post subject:  Re: Removing items a units inventory with lua

I had an idea, inspired by the wargear system from the Warhammer tabletop game, and by Capnbubs Crobos faction. You would choose a piece of wargear (say, heavy armor), and drop it on the unit. Then, using a method similar to that of the Crobos, the armor would be changed to heavy armor. However, if you have a lot of wargear (armor, shields, teleport beacon, earmuffs etc) it would fill up your inventory with useless stuff. So if it could be deleted from the inventory as soon as it has equipped the wargear it would be a much easier to use system.

Author:  CaveCricket48 [ Sat Mar 06, 2010 4:19 pm ]
Post subject:  Re: Removing items a units inventory with lua

This deletes any MO, but only works for devices when they're currently being held.
Code:
device.ToDelete = true


This adds a device to an actor's inventory:
Code:
actor:AddInventoryItem(CreateHDFirearm("SMG"))

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/