Author Topic: [Query/Potential Request] Stationary rotation/asteroid movement AIs?  (Read 956 times)

0 Members and 1 Guest are viewing this topic.

Offline T-Man

  • 210
  • I came... I saw... I had a cuppa!
[Query/Potential Request] Stationary rotation/asteroid movement AIs?
(Wasn't 100% sure which board to put this in)

Have a quick question and potential request for those versed in the AI; Is the standard game AI able, or could it be potentially made able, to handle objects with unusual movement behaviour? I had two particular cases in mind for some projects I'm thinking of doing;

  • Stations that are immobile, but still able to turn to face things using thrusters. I'm thinking of modelling heavier sentries with guns too large for turning turrets so the whole thing turns to face targets instead. This can currently be manually done with SEXPs but an automated system if possible would make such a sentry much easier to use.
  • Ships that copy asteroid behaviour when they move, be it freely or along waypoints (able to move in any direction without turning, can roll or spin without changing course, etc). Had an idea of doing armed asteroids (modified copies of the default asteroids so they look identical to the normal ones) with the weapons hidden away until the mission designer wants them activated (via SEXPs), making them great for ambushes during asteroid missions. If they could copy normal asteroid behaviour while moving it would help a lot for them blending in pre-activation.

Cheers for your time.
Also goes by 'Murasaki-Tatsu' outside of Hard-Light

UEF fanboy. Rabid Imagination.

 

Offline Axem

  • 211
Re: [Query/Potential Request] Stationary rotation/asteroid movement AIs?
1: Having a ship with zero max velocity and ample turning times and something like a fighter or cruiser ship flag should work. You'd give the sentry gun an attack order and it would turn to face the target and fire when it can.

2: Well you can't directly copy the movement, but you can try and fake it... What I would do there is have an asteroid-with-turrets ship and give it the ability to glide. Then set the initial velocity to be something that would match the rest of your asteroid belt (probably want something pretty slow so it won't exit the field bounds) and force it to glide (with force-glide) and then use the maneuver sexps to give it a slight tumble while it moves.

If you want the asteroid to be on waypoints, and still want a tumbling asteroid, then you'd probably need to set something tricky up in PCS2, like have an invisible base ship, then the asteroid as a subobject that will rotate slowly, and then the turrets on top of that.

 

Offline T-Man

  • 210
  • I came... I saw... I had a cuppa!
Re: [Query/Potential Request] Stationary rotation/asteroid movement AIs?
Oh excellent didn't realise 1 would work, will be sure to give these a try when I next get the chance.

Thanks for the help :yes:.
Also goes by 'Murasaki-Tatsu' outside of Hard-Light

UEF fanboy. Rabid Imagination.