Author Topic: static NPC?  (Read 71 times)

ninekorn

  • Full Member
  • ***
  • Posts: 168
    • View Profile
static NPC?
« on: May 01, 2019, 04:58:11 pm »
Hi ai_enabled or/and Lurler,

Again, the basic interior station MOD V1.0 is almost completed. But I wanted to know if there is something that i can do to have a static NPC. Meaning - a NPC that doesn't move.

I have thought of a couple of things:

  • making a NPC Stick to point
  • to make its WEIGHT super HEAVY.
  • to make the collider WEIGHT super HEAVY.
  • to make its speed 0 and acceleration 0 inside of the calculateShip.js script
  • to use opposite direction force with addtorque/addforce
  • All of the above combined


The reason is I want the interior station MOD V1.1 to incorporate destructible stations. I can put a NPC that has an empty hull but individually attach the Stations colliders to it to make it stay EXACTLY where the station is and BAM if the npc is destroyed by hitting its colliders that are positioned EXACTLY where the station walls are, the station is also destroyed... That is how i have thought of making them destructible.

Any ideas of a better way or static NPC function?

Oh and i have got no clue if 30++ colliders on an NPC will affect the game performance. It might hit it hard.

nine
« Last Edit: May 01, 2019, 05:02:42 pm by ninekorn »

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1267
    • View Profile
Re: static NPC?
« Reply #1 on: May 02, 2019, 06:16:18 am »
Hi!
Hmm, aren't turrets are static ships, technically? So they're not moving. Please look on the turret hull definition probably it's defined there. Or maybe via JS code when a turret is spawned.

Regards!

ninekorn

  • Full Member
  • ***
  • Posts: 168
    • View Profile
Re: static NPC?
« Reply #2 on: May 02, 2019, 03:41:38 pm »
Wow... why didn't I think of that??? This is a game changed for the station mod in many ways. thank you ai_enabled for pointing me in the right direction.

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1267
    • View Profile
Re: static NPC?
« Reply #3 on: May 02, 2019, 04:04:09 pm »
Enjoy! :-)