View unanswered posts | View active topics It is currently Thu Dec 26, 2024 4:43 am



Reply to topic  [ 3 posts ] 
 Can you edit the properties of a mag inside an HDFirearm? 
Author Message
User avatar

Joined: Thu Jul 17, 2014 5:44 am
Posts: 15
Reply with quote
Post 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.


Mon Jan 18, 2016 3:48 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post 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.


Mon Jan 18, 2016 5:50 am
Profile
User avatar

Joined: Thu Jul 17, 2014 5:44 am
Posts: 15
Reply with quote
Post 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.


Mon Jan 18, 2016 6:14 am
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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.056s | 15 Queries | GZIP : Off ]