Data Realms Fan Forums
http://45.55.195.193/

How to transfer AI Scene Way Points
http://45.55.195.193/viewtopic.php?f=73&t=16740
Page 1 of 1

Author:  CaveCricket48 [ Sun Oct 04, 2009 3:14 am ]
Post subject:  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.

Author:  Kyred [ Mon Oct 05, 2009 7:34 am ]
Post subject:  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

Author:  CaveCricket48 [ Mon Oct 05, 2009 10:02 pm ]
Post subject:  Re: How to transfer AI Scene Way Points

My script is working now. Thanks a bunch!

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/