Nexus Skirmisher
Nexus Modding => Scripting => Topic started by: Mularac on July 13, 2011, 01:54:07
-
I've assigned to a group of AI ships this command:
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:
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?
-
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...
-
Thanks! that did it. I had completely forgotten about that particular command....