Data Realms Fan Forums
http://45.55.195.193/

HDFirearms in Hand Verses on Ground
http://45.55.195.193/viewtopic.php?f=73&t=15895
Page 1 of 1

Author:  Kyred [ Thu Jul 16, 2009 11:39 pm ]
Post subject:  HDFirearms in Hand Verses on Ground

What is the difference between a weapon that an actor is currently holding in their hand and the same weapon after it is dropped by the actor?

I noticed that the Create(self) and Update(self) functions are not called when an actor pulls the weapon out. However, they are called when an actor drops the weapon (including when a dropship drops it). So something must be different between them.

Author:  Mind [ Thu Jul 16, 2009 11:44 pm ]
Post subject:  Re: HDFirearms in Hand Verses on Ground

Lua for now doesn't word on heldevices, but as soon as they are dropped, seeing as they aren't held anymore, lua works on them. You can of course get around it hackily.

Author:  Grif [ Thu Jul 16, 2009 11:46 pm ]
Post subject:  Re: HDFirearms in Hand Verses on Ground

Weapons when held are considered attachables, basically.

Author:  Kyred [ Thu Jul 16, 2009 11:54 pm ]
Post subject:  Re: HDFirearms in Hand Verses on Ground

HDFireArms are HeldDevices and HeldDevices are Attachables. I found this function in the documentation for HeldDevice.
Quote:
Activate
Activates one of this HDFirearm's features. Analogous to 'pulling the trigger'.

Arguments:

* None.

Return value:

None.

So when an HDFireArm is held, it is an attachable (or HeldDevice) but while it is on the ground it is an HDFireArm? Activate() is a function of HeldDevices, so does this mean a gun can still shoot while it's on the ground? Or am I still not getting something?

Author:  piipu [ Thu Jul 16, 2009 11:59 pm ]
Post subject:  Re: HDFirearms in Hand Verses on Ground

Yup, it'll work. Mail made heatseeking gatling guns using Activate().

Author:  Kyred [ Fri Jul 17, 2009 12:07 am ]
Post subject:  Re: HDFirearms in Hand Verses on Ground

Awesome! This is gonna be so cool :D.

Thanks for the help guys!

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