Game framerate slows over time (Enemy AI?)

hi, my game FPS slowly decreases over time, starts at 100 and after a few minutes drops to 5. I think its enemy AI because when i turned off the AI bots sensing (about 30 in total) and flew around the level, there was no fps drop.

I have attached one of our bots blueprint (AI_ship)
there are 2 others, AI drone, and AI bomber. All share the same script, just different muzzle flashes and explosions etc.

Its a flying vehicular game.

I think something in the blueprints is broken, if anyone can help, thank you.

Make sure that spawned objects are being destroyed. If you’re spawning missiles, emitters, ships, and effects then that would tank the framerate over time.

thanks, someone else wrote the scripts, and i am fixing them. Can you look at the scripts screenshots, and see if they are being destroyed? I am posting here because I need help, i dont know how to “make sure” of that. thank you.

when the framerate is low…

Hit ‘`’ the Tilde key to open up the command console.

Then type : stat dumphitches
And then after a few frames do it again to turn it off.

Shutdown the app, and look at the log. It will tell you where all the frame time is going. And you can drill down into this to find out what is causing it.

thanks im getting these errors:

LogScript: Warning: Attempted to access Cockpit via property Cockpit, but Cockpit is pending kill
AI_Bomber_C /Game/Maps/UEDPIE_0_Kickstarter_trailer.Kickstarter_trailer:PersistentLevel.AI_Bomber2
Function /Game/FlyingBP/Blueprints/AI_Bomber.AI_Bomber_C:ExecuteUbergraph_AI_Bomber:3A34
PIE: Error: Blueprint Runtime Error: Attempted to access Cockpit via property Cockpit, but Cockpit is pending kill from function: ‘ExecuteUbergraph_AI_Bomber’ from node: Play Sound at Location in graph: EventGraph in object: AI_Bomber with description: Attempted to access Cockpit via property Cockpit, but Cockpit is pending kill
LogScript: Warning: Attempted to access Cockpit via property Cockpit, but Cockpit is pending kill
AI_Bomber_C /Game/Maps/UEDPIE_0_Kickstarter_trailer.Kickstarter_trailer:PersistentLevel.AI_Bomber2
Function /Game/FlyingBP/Blueprints/AI_Bomber.AI_Bomber_C:ExecuteUbergraph_AI_Bomber:3ABA

LogScript: Warning: Attempted to access Cockpit via property Cockpit, but Cockpit is pending kill
AI_Ship_C /Game/Maps/UEDPIE_0_Kickstarter_trailer.Kickstarter_trailer:PersistentLevel.AI_Ship3
Function /Game/FlyingBP/Blueprints/AI_Ship.AI_Ship_C:ExecuteUbergraph_AI_Ship:28B8

Comp, but CollisionComponent is pending kill
LogParticles: Warning: Spawning 46893 GPU particles in one frame[57527]: P_RocketLauncher_Trail_Light/sparks

PIE: Error: Blueprint Runtime Error: Attempted to access Cockpit via property Cockpit, but Cockpit is pending kill from function: ‘ExecuteUbergraph_AI_Ship’ from node: Play Sound at Location in graph: EventGraph in object: AI_Ship with description: Attempted to access Cockpit via property Cockpit, but Cockpit is pending kill
LogScript: Warning: Attempted to access Cockpit via property Cockpit, but Cockpit is pending kill
AI_Ship_C /Game/Maps/UEDPIE_0_Kickstarter_trailer.Kickstarter_trailer:PersistentLevel.AI_Ship3