View unanswered posts | View active topics It is currently Wed Jan 08, 2025 4:39 am



Reply to topic  [ 5 posts ] 
 Need help with AI 
Author Message
User avatar

Joined: Wed Feb 24, 2010 11:00 pm
Posts: 255
Location: Unknow
Reply with quote
Post Need help with AI
I wanna to know ho to make the AI stop even jumping to the ground. :???:


Thu Mar 04, 2010 12:33 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Need help with AI
Assuming you know basic ini modding...

Attach this script:
Code:
function Update(self)

   if self:IsPlayerControlled() == false and self.AIMode == Actor.AIMODE_SENTRY then
   self:GetController():SetState(Controller.BODY_CROUCH,false);
   self:GetController():SetState(Controller.MOVE_RIGHT,false);
   self:GetController():SetState(Controller.MOVE_LEFT,false);
   end

end

to an actor. It'll only work on the actor that you attach the script to, though.


Thu Mar 04, 2010 12:36 am
Profile
User avatar

Joined: Wed Feb 24, 2010 11:00 pm
Posts: 255
Location: Unknow
Reply with quote
Post Re: Need help with AI
CaveCricket48 wrote:
Assuming you know basic ini modding...

Attach this script:
Code:
function Update(self)

   if self:IsPlayerControlled() == false and self.AIMode == Actor.AIMODE_SENTRY then
   self:GetController():SetState(Controller.BODY_CROUCH,false);
   self:GetController():SetState(Controller.MOVE_RIGHT,false);
   self:GetController():SetState(Controller.MOVE_LEFT,false);
   end

end

to an actor. It'll only work on the actor that you attach the script to, though.


But where i attach it?(im new XD)
anyway thanks for trying to help.


Thu Mar 04, 2010 12:58 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Need help with AI
You attach it to the actor that you want to stop jumping off ledges with "[tab]ScriptPath = actorfolder.rte/script.lua"

There is a tutorial here that you can read to learn modding.


Thu Mar 04, 2010 1:18 am
Profile
User avatar

Joined: Wed Feb 24, 2010 11:00 pm
Posts: 255
Location: Unknow
Reply with quote
Post THX
Im trying to do this now.thx


Thu Mar 04, 2010 1:39 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 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.035s | 13 Queries | GZIP : Off ]