View unanswered posts | View active topics It is currently Fri Apr 19, 2024 8:12 pm



Reply to topic  [ 2 posts ] 
 Modifying human AI? 
Author Message
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post Modifying human AI?
How can I make it so that when a sees something to kill, regardless of whether it has a weapon or not, it calls this function?
Code:
FireLaser(self);
I think it would involve modifying UpdateAI().


Mon Sep 19, 2011 11:06 pm
Profile
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post Re: Modifying human AI?
After lots of searching, I found that putting
Code:
   if self.Target ~= nil then
      
      FireLaser(self);
      
   end

at the end of UpdateAI() worked. Maybe this will help someone else.


Tue Sep 20, 2011 12:14 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 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.113s | 17 Queries | GZIP : Off ]