View unanswered posts | View active topics It is currently Thu Dec 26, 2024 5:26 pm



Reply to topic  [ 7 posts ] 
 Controlling actors 
Author Message
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post Controlling actors
Is it possible to make an actor do something specific using Lua? I'm interested in making an actor aim at the certain angle and then fire it's weapons at certain time. AFAIK aiming is not difficult but what about actually firing? Should I mess with Controller class to do that?

Thanx in advance


Tue Jul 14, 2009 11:44 am
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Controlling actors
I'm quite sure there was either a function for it or a boolean that could be checked to true which meant that the actor would fire either this or the next sim update.


Tue Jul 14, 2009 12:27 pm
Profile WWW
User avatar

Joined: Fri Oct 17, 2008 9:46 pm
Posts: 5212
Location: The Grills Locker.
Reply with quote
Post Re: Controlling actors
You are looking for this:

Code:
actor:SetAimAngle(*Insert angle here*);


and this:

Code:
actor:GetController():SetState(Controller.WEAPON_FIRE,true);


Tue Jul 14, 2009 1:41 pm
Profile WWW
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post Re: Controlling actors
Thanks, Areku


Tue Jul 14, 2009 2:43 pm
Profile
User avatar

Joined: Fri Oct 17, 2008 9:46 pm
Posts: 5212
Location: The Grills Locker.
Reply with quote
Post Re: Controlling actors
No problem.


Tue Jul 14, 2009 3:09 pm
Profile WWW
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Controlling actors
I would set the InputMode to network mode before operating to null out the AI features, as disabled still has a few AI features.


Tue Jul 14, 2009 6:31 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post Re: Controlling actors
mail2345 wrote:
I would set the InputMode to network mode before operating to null out the AI features, as disabled still has a few AI features.


Added this line to experimental dropship control. Thanks, mail.


Thu Jul 16, 2009 5:42 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 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.119s | 13 Queries | GZIP : Off ]