Hello good people!
Is there a way to make an enemy ship stop, stay in one place and attack from a stationary position?
I've tried using ObjMoveTo to stop the ship, which is fine, but as soon as it is stopped the little critter immediately wants to fly off again.
shpOrderHold doesn't seem to work either.
Is it possible?
Ship AI question
If you tell your wingmen to wait I'm pretty sure they still fire, if that's right then the relevant code is:
Code: Select all
(shpCancelOrders [the ship])
(shpOrder [the ship] 'hold)
Hmm...
-
- Commonwealth Pilot
- Posts: 55
- Joined: Wed Aug 27, 2008 6:30 pm
- Location: USA
A ship ordered to wait does not face enemies or fire. A ship ordered to hold does.
shpOrderHold works for me on a hostile ship with no eventHandler and no other orders that was specifically created with a script (not a random encounter or otherwise associated with a station). Setting the aggressor attribute in the ship's AISettings did not seem to have any effect when the ship was holding.
I had a different problem with ordering a hostile ship to hold: the ship would not stop holding after the specified time. However, ordering the ship to wait for a specified time worked as expected.
shpOrderHold works for me on a hostile ship with no eventHandler and no other orders that was specifically created with a script (not a random encounter or otherwise associated with a station). Setting the aggressor attribute in the ship's AISettings did not seem to have any effect when the ship was holding.
I had a different problem with ordering a hostile ship to hold: the ship would not stop holding after the specified time. However, ordering the ship to wait for a specified time worked as expected.
-
- Anarchist
- Posts: 18
- Joined: Sun Mar 21, 2010 8:13 pm
Thanks that's good to know, I will try it out. The eventHandler might have been what was stopping it from working. But I think alterecco is right, it appears extremely difficult to get them to behave a certain way. A centauri raider with a zero thrust propulsion drive fitted still thrusts like crazy trying to move (quite funny to see actually) and does not necessarily attack.speedofsquid wrote:
shpOrderHold works for me on a hostile ship with no eventHandler and no other orders that was specifically created with a script (not a random encounter or otherwise associated with a station).