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

Can you edit the properties of a mag inside an HDFirearm?
http://forums.datarealms.com/viewtopic.php?f=1&t=46027
Page 1 of 1

Author:  WobbaWoo [ Mon Jan 18, 2016 3:48 am ]
Post subject:  Can you edit the properties of a mag inside an HDFirearm?

The wiki has no documentation on this as far as I can tell. Is there a way to modify a magazine, for instance changing roundcount or weight, through Lua?

I'm not sure if this more appropriate for Mod Making or Lua Scripting, so I put it here.

Author:  CaveCricket48 [ Mon Jan 18, 2016 5:50 am ]
Post subject:  Re: Can you edit the properties of a mag inside an HDFirearm?

Yes. You can find a few examples in vanilla scripts.

Disarmer ( Base.rte/Devices/Disarmer/Disarmer.lua - line 42 )
Constructor ( Base.rte/Devices/Constructor/Constructor.lua - line 186 )
Grapple Gun ( Base.rte/Devices/Grapple Gun/Grapple.lua - line 58, 276)

And probably a few of other guns.

If I recall correctly, just about all physical properties can be changed on magazines. Just make sure you do a check if the magazine exists before trying to modify it.

Author:  WobbaWoo [ Mon Jan 18, 2016 6:14 am ]
Post subject:  Re: Can you edit the properties of a mag inside an HDFirearm?

Thanks. I also was able to find a wiki page with some more information. Too bad a number of magazine properties are read-only.

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