Author Topic: Ship facing objects  (Read 1502 times)

0 Members and 1 Guest are viewing this topic.

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Hello again,

I have a question how this could be done (It always pained me, even in the very old builds).

Let's say I have a destroyer facing an enemy ship and changes fire  with it. After the enemy is destroyed, another enemy appears right  behind the destroyer.

How can it be achived, that the destroyer simply rotates around the Y-Axis and face the new enemy eye in eye ??

I once managed it with attack and AI-Goals which I then deleted after a specific time, but it was rather complicated.

If I use waypoints, the stupid AI starts going on a world journey and makes moves and rotates around different axis which will cause half the crew to run to the toilet for spitting :doubt:

Anyone has a idea how to do this ? The "set-ship-facing-object" is not usable, because It changes the ships-facing instantly.

Is there maybe another SEXP which I'm missing ?
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
That unfortunately, would require a stroll through the AI code, which coders avoid with a vengance.  My best suggestion is to open up the Inferno Mission M9, where the EA jumps throught he Sol Gate, which the GTVA recaptured in the previous mission.  After engaging 2 EA cruisers, the GTVA destroyer has to re-orient iself to bring its flank cannons to bear.  I'm guessing that they used waypoints to accomplish this (which you already brought up), so you can get a better picture of how to accomplish this turn with a minimum of AI weird stuff.

Later!
The Trivial Psychic Strikes Again!

 

Offline magatsu1

  • 210
you could maybe give the ship a waypoint close enough so that it would appear to shift round but not travel too far. IIRC there was alot of fuss about doing this so that an Orion would broadside hostile ships.
Blitzerland: Knows what he's talkin' about

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
The problem with that IIRC is that ships don't always turn like you'd expect them to, and so you'd wind up with an Orion showing it's belly rather than its side to an enemy.  You might be able to use a waypoint with cap-waypoint-speed 0 to get a destroyer to face a point smoothly without actually moving.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Yep, that's the problem. You have no gurantee that the ship will rotate
around the Y-axis, which it should in this case.

I must take a look how I did this in the old mission once, but I fear it
worked there only because the distance was rather big and I had the
beams involved (which I have not available now).

While writing this, I think I got an idea. While creating the autopilot-missions I noticed, that the ships face the far distant waypoint pretty good, so maybe the trick is to set the waypoint very far away. I gotta try this
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.

  

Offline Starman01

  • 213
  • Mechwarrior
    • Wing Commander Saga
Nope, still not working. Don't know why it worked earlier. When I try it now, the cruiser is rotating at all 3 axis just to face the other ship.

This AI can really make you cry :( Kamikaze isn't working anymore either).
MECHCOMMANDER OMNITECH

9 out of 10 voices in my head always tell me that I'm not insane. The 10th is only humming the melody of TETRIS.