View unanswered posts | View active topics It is currently Fri Dec 27, 2024 8:05 am



Reply to topic  [ 3 posts ] 
 How to transfer AI Scene Way Points 
Author Message
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post How to transfer AI Scene Way Points
I'm trying to make an actor inherit another actor's AI Scene Way Points when in the Go To mode. I don't know how to transfer the way point though.


Sun Oct 04, 2009 3:14 am
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: How to transfer AI Scene Way Points
This will copy over the furthest waypoint of the actor being copied from. The 'if waypoint ~= self.SomeActor.Pos' makes sure that the actor has a waypoint to transfer. If he doesn't, then GetLastAIWaypoint() will just return his position.

I don't know of an easy way to transfer the closer ones.
Code:
local waypoint = self.SomeActor:GetLastAIWaypoint();
if waypoint ~= self.SomeActor.Pos then
    self.SomeOtherActor:AddAISceneWaypoint(waypoint);
end


Mon Oct 05, 2009 7:34 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: How to transfer AI Scene Way Points
My script is working now. Thanks a bunch!


Mon Oct 05, 2009 10:02 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.039s | 15 Queries | GZIP : Off ]