Author |
Message |
CrazyMLC
Joined: Fri Dec 22, 2006 4:20 am Posts: 4772 Location: Good news everyone!
|
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 |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: Flying AHuman
Unless you want to write custom AI, you don't.
|
Wed Aug 25, 2010 1:36 am |
|
|
CrazyMLC
Joined: Fri Dec 22, 2006 4:20 am Posts: 4772 Location: Good news everyone!
|
Re: Flying AHuman
Then can you give dropships AIWaypoints?
|
Wed Aug 25, 2010 1:44 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Flying AHuman
Probably, but I doubt Data coded dropships to actually follow waypoints.
|
Wed Aug 25, 2010 1:55 am |
|
|
zalo
Joined: Sat Feb 03, 2007 7:11 pm Posts: 1496
|
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 |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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 |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: Flying AHuman
Dropships don't follow waypoints. I've tried it.
|
Wed Aug 25, 2010 7:56 am |
|
|
Abdul Alhazred
DRL Developer
Joined: Tue Aug 11, 2009 5:09 am Posts: 395
|
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 |
|
|
CrazyMLC
Joined: Fri Dec 22, 2006 4:20 am Posts: 4772 Location: Good news everyone!
|
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 |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
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 |
|
|
CrazyMLC
Joined: Fri Dec 22, 2006 4:20 am Posts: 4772 Location: Good news everyone!
|
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 |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Flying AHuman
Yes and yes.
|
Sun Aug 29, 2010 4:39 pm |
|
|
|