Jump to content

Photo

Creating a new 'aircraft' race that flies

actor race custom flying

  • Please log in to reply
7 replies to this topic

#1
Sars99

Sars99

    Enthusiast

  • Members
  • PipPip
  • 168 posts

I've hit a stumbling block that I can't get past, hoping someone here might have an idea or some experience.

 

My overall aim is to create a race based on the Stingray static object mesh.

 

Using the Vertibird race as a template I have created the race, skin (armor and addon), a NPC, and bodypart data.

 

 

I have a quest that runs when a player targets and activates an enemy. What I'm trying to achieve at this stage is to have the aircraft fly over the target area. Using an AI package based on the VertibirdTravelToLocation template which targets the player.

 

The quest runs, the aircraft spawns in and gets enabled. The quest stage progresses and starts the scene, the aircraft gets the correct AI package. But it doesn't move/fly.

 

Through debug tracing I know that its flying state is 2 (cruising), it has the correct package and the player/markers and aliases are filled.

 

What have I missed? I knew this would be complex and take some tinkering but I'm out of ideas as to what I need to do to get it to actually fly.

 

 

All pointers welcome, let me know if you need to see anything specific.

 

Thanks in advance.



#2
PJMail

PJMail

    Faithful poster

  • Members
  • PipPipPipPip
  • 1,371 posts

The danger with the Vertibird is a lot is implemented by the game itself and totally ignores the AI packages.

If you have added the vertibird keywords to your Stingray (isvertibrd perhaps?) then you are in for a world of pain at some point when the game says 'oh - this is a Vertibird, I'll do that'.

 

Saying that, however, even after my many months of fighting those 'game overrides' I have no real idea what the game knows about as the standard game inierface records (default Objects DFOB) don't refernce any veribird keywords/actions...

 

Anyway, when I can't get the Vertibird to takeoff I 'kick' it with PlayIdleAction(ActionflyStart). Also make sure you have not disabled flying with  SetAllowFlying()



#3
Sars99

Sars99

    Enthusiast

  • Members
  • PipPip
  • 168 posts

Thanks for the pointers. I've removed the isVertibird keyword from the race.

 

My issue isn't so much that it doesn't take off as much as it just hovers whilst in 'cruise speed'.

 

from my debug code I know it has the correct package and the quest scene is playing. The aircraft is set to fly and flying state returns as 2 'cruising'.

 

I tried adding in the PlayIdleAction(ActionflyStart) line in against the aircraft but it didn't work. I couldn't associate the action with the property.



#4
SKK50

SKK50

    Institutum delenda est

  • Premium Member
  • 5,785 posts

Had exactly the same issues trying to hijack the VFT fast travel vertibird.

 

Invisible flying stuff gets done by the platform sometimes with and sometimes ignoring the AI packages.

 

Nothing that the script layer can actually see, like testing GetCurrentPackage() returns stuff that the actor is not actually doing.

 

Not to cast shade, but I had to give up on my dream and use static models + moveto.



#5
Sars99

Sars99

    Enthusiast

  • Members
  • PipPip
  • 168 posts

That's frustrating then, so I guess this experiment of mine is futile? I'm unsure of what else I could tweak to get the ideal outcome if there's background code or whatever that we can't influence.



#6
pepperman35

pepperman35

    Old hand

  • Members
  • PipPipPip
  • 847 posts

Don't know if there are any similarities with what you are trying to accomplish but the Stingray Air Support  might offer some clues.  



#7
Sars99

Sars99

    Enthusiast

  • Members
  • PipPip
  • 168 posts

Thank you. I am very familiar with that mod and the method used.

 

I was hoping to go a bit beyond how that mod tackles this issue which is just having a movable static object translate to a reference. When trying to apply that method over larger distances the aircraft seemingly got stuck on buildings and didn't really fly smoothly.

 

 

But perhaps that's the only way to get anything like this working in game.



#8
PJMail

PJMail

    Faithful poster

  • Members
  • PipPipPipPip
  • 1,371 posts

Have you tried the trick Skyrim people do for flyable dragons? Disable gravity while flying and use havok impulse or translateto to make it fly smoothly. You should be abl to fly 'seated' so if you crash into buildings - well in the real world that happens too! Not 100% sure it works in FO4 but if you already have the basis of the system then should be easy to try.

 

Disable Gravity:     utility.SetIniFloat("fInAirFallingCharGravityMult:Havok",0.0)

The Skyrim mod I am talking about Fully Flyable Dragons - lots of good ideas for making 'flying' things...







Also tagged with one or more of these keywords: actor, race, custom, flying

IPB skins by Skinbox
Page loaded in: 1.054 seconds