View unanswered posts | View active topics It is currently Sat Apr 27, 2024 11:06 am



Reply to topic  [ 6 posts ] 
 HDFirearms in Hand Verses on Ground 
Author Message
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post 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.


Thu Jul 16, 2009 11:39 pm
Profile
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1359
Location: USA
Reply with quote
Post 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.


Thu Jul 16, 2009 11:44 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: HDFirearms in Hand Verses on Ground
Weapons when held are considered attachables, basically.


Thu Jul 16, 2009 11:46 pm
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post 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?


Thu Jul 16, 2009 11:54 pm
Profile
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post Re: HDFirearms in Hand Verses on Ground
Yup, it'll work. Mail made heatseeking gatling guns using Activate().


Thu Jul 16, 2009 11:59 pm
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: HDFirearms in Hand Verses on Ground
Awesome! This is gonna be so cool :D.

Thanks for the help guys!


Fri Jul 17, 2009 12:07 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 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.084s | 17 Queries | GZIP : Off ]