Nexus Skirmisher

Nexus Modding => Scripting => Topic started by: Mularac on July 13, 2011, 01:54:07

Title: Ships on patrol ignore "tMoveTo" commands
Post by: Mularac on July 13, 2011, 01:54:07
I've assigned to a group of AI ships this command:
Code: [Select]
s.this:tSetTerritory(m.Station, m.Station:radius*2, m.Station:radius*3, m.Station:radius*5, floor(rnd(50,150)), 2);
Where m.station is the identifier of a station insystem.
Afterwards, I want to have them break their patrol and engage the player's fleet, and for them to do that I assign them a tMoveTo command, more specifically:
Code: [Select]
e.auxShip:tSetForbid(#FORBID_MOTION_MOTIVATION_AWAY);
e.auxShip:tSetForbid(#FORBID_FIRE_FREE);
e.auxShip:tMoveTo(e.closestShip,2,0);
e.auxShip:tMoveToIntensity:=1000000000000;
Where this code is placed inside an Execlist loop that goes through the ships assigned the previous patrol.
The ships, however, won't be bothered with this new command and will continue their patrol.

I've already tested that if the ships are not given the patrol duty they'll move towards my ships.

Anyone got any ideas?
Title: Re: Ships on patrol ignore "tMoveTo" commands
Post by: The Old Dragon on July 13, 2011, 08:49:37
Hi Mularac,

Have you tried clearing the older territory command before issuing the new order?

Not used it yet, but this may help...

   obj:tClearTerritory();

Just a thought...
Title: Re: Ships on patrol ignore "tMoveTo" commands
Post by: Mularac on July 13, 2011, 11:35:17
Thanks! that did it. I had completely forgotten about that particular command....