View unanswered posts | View active topics It is currently Fri Apr 19, 2024 1:34 am



Reply to topic  [ 12 posts ] 
 Flying AHuman 
Author Message
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Flying AHuman
How do you make it so that an AHuman flies through the path of a AI Waypoint using lua, rather than trying to walk there?


Wed Aug 25, 2010 1:07 am
Profile WWW
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Flying AHuman
Unless you want to write custom AI, you don't.


Wed Aug 25, 2010 1:36 am
Profile WWW
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Re: Flying AHuman
Then can you give dropships AIWaypoints?


Wed Aug 25, 2010 1:44 am
Profile WWW
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: Flying AHuman
Probably, but I doubt Data coded dropships to actually follow waypoints.


Wed Aug 25, 2010 1:55 am
Profile

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post Re: Flying AHuman
Well, you could make an invisible AHuman attached to the drop ship
which is set to follow waypoints, and then the dropship reads the AHuman's
actions and and flies accordingly. Jetpack = Up... etc.

I've done it before.


Wed Aug 25, 2010 5:32 am
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Flying AHuman
CaveCricket48 wrote:
Probably, but I doubt Data coded dropships to actually follow waypoints.


This I'm actually not sure about.

Keep in mind that the AI does have some kind of movement code; they will avoid (sometimes) bunkermodules, and they also move out of the undesignated LZ areas.

So, it's actually possible that dropships have some kind of rudimentary waypoint code, I'm just not sure how well it works.

You're probably better off either circumventing it, or making an entirely seperate system.


Wed Aug 25, 2010 6:06 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Flying AHuman
Dropships don't follow waypoints. I've tried it.


Wed Aug 25, 2010 7:56 am
Profile WWW
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: Flying AHuman
I made a custom AI for the EDV and Gunship mods to make an AHuman fly to a way-point. The hard-coded AI tends to interfere a lot when there are enemies around but the results were acceptable despite all of the limitations.

You can find it in Gunship.rte\Actors\Clones\FlyingClone.lua.


Wed Aug 25, 2010 12:06 pm
Profile
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Re: Flying AHuman
zalo wrote:
Well, you could make an invisible AHuman attached to the drop ship
which is set to follow waypoints, and then the dropship reads the AHuman's
actions and and flies accordingly. Jetpack = Up... etc.

I've done it before.

Could you explain how to do that in a little more detail, please?


Thu Aug 26, 2010 3:10 am
Profile WWW
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: Flying AHuman
You script should (if attached to the ACDropShip)

1. Create the AHuman.
2. Appropiately position then AHuman over the DS.
3. Set the Waypoint for the AHuman to wherever.
4. Check controls of the AHuman.
5. Move the DS based on the controls of the AHuman.

I predict there will be some funky movements when heading towards waypoints, since the AI on AHumans makes them walk on the ground and not... You know, fly through the air.


Thu Aug 26, 2010 7:36 pm
Profile
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Re: Flying AHuman
If I were to put the script onto the AHuman, would this work as far as making the ACDropShip?
Code:
   self.Propulsion = CreateACDropShip("Propulsion")
   self.Propulsion.Pos = self.Pos
   self.Propulsion.Vel = self.Vel
   MovableMan:AddCraft(self.Propulsion)

Then somewhere in function Update(self) I would add in some code to automatically position the Craft over the AHuman.

As far as transferring controls, what controls does an ACDropShip use? Same as an AHuman? MOVE_LEFT, etc?


Sun Aug 29, 2010 9:49 am
Profile WWW
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post Re: Flying AHuman
Yes and yes.


Sun Aug 29, 2010 4:39 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 12 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.056s | 15 Queries | GZIP : Off ]