Page 1 of 1

Communication or shpOrder bug

Posted: Sun Aug 03, 2008 8:31 pm
by Periculi
I was working on a little carrier fleet mod and produced a small test invoke to launch 4 fighter autons.

Each auton received the same orders in a (for statement

3 autons assumed position and followed as ordered. 1 auton seems to have it's own idea of what it should do and constantly orbits the group. This is behavior I thought was due to giving a shpOrder patrol or similar- whereas the shpOrderEscort seems more like what the 3 are doing.

Why is 1 auton in the set of 4 who recieve the same orders acting differently?


Next problem- the communications. When any of the autons in the group are ordered to wait here, they disregard the order.

The communication panel shows first a selection A B C D to choose the auton to communicate with- when selected the panel next shows the options for that particular auton. One of the options is Wait Here. I have used this option before, and the behavior expected is to see the auton waiting- NOT following me in the exact same position as escort (or the oddball orbit patrol)

I am using the autons from the game- when used singly, the orders are carried out. When used in groups the order to wait is totally disregarded.

Code: Select all

	<Invoke key="H" installedOnly="True">
		(block (fighter)
			; Create the fighters
		  (for i 1 4
			(block nil
			(setq fighter
				(sysCreateShip 
					&scAutoSentinel;
					(objGetPos gSource)
					&svFriendlyAuton;
					
					)
				)
			 
			
			; Escort playership
			(shpOrderEscort fighter gSource)
			)
		  )

		)

	</Invoke>

Posted: Sun Aug 03, 2008 9:01 pm
by Periculi
:lol: I guess a better question would be: What is the purpose of the last value in sysCreateShip? It isn't explained over at xelerus, and we need it to make the commands work apparently.


(sysCreateShip [ship] [position] [sovereign] [??? "string"])

I removed the "auton" from the code, and got the strange results- I added it back in and they seemed to work as expected. What is that last "string" for? What parameters does it take?

Posted: Mon Aug 04, 2008 2:57 pm
by digdug
the last string in sysCreateShip is the controller, that can be manipulated with shpSetController function.

The controller is a hardcoded AI behaviour, like "auton" or "fleet". Also it activates the auton carrier button and the wingmens button.

For an example see the rama and mule upgrade mod, that can switch rama from wingman to auton and back.
http://xelerus.de/index.php?s=mod&id=100

The error on xelerus is due to my lazyness, I planned from a long time to retest the function and correct it. :oops: