What's wrong with this ship?

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

So I've been working on getting turrets working for S.U.O....but they aren't. For some reason, they just won't track targets...they just wait for them to go in front of the gun. So here's the development turret, the T7....can anyone see what the problem is? They're deployed as an invokable item (like an auton), and are given 'Hold' orders as they're created. I've copied a lot from my older turrets (which used omnidirectional weapons), and the Ares Sentry.

Code: Select all

<!---T7--->

<!---item--->


<ItemType UNID="&itT7Turret;"

			name=				"Tenhove T7 turret"

			level=				"5"

			value=				"2000"

			mass=				"5000"

			frequency=			"rare"

			modifiers=			"MinorItem; Auton"



			description=		"The T7 is the most powerful in the Tenhove line of turrets and autosentinals."

			>



		<Image imageID="&rsItems1;" imageX="96" imageY="288" imageWidth="96" imageHeight="96"/>



		<Invoke key="T">

			(block (nil)



(setq theShip (sysCreateShip &scT7Turret; (objGetPos gPlayerShip) &svPlayer;"turret"

	)

		)

(shpOrder theShip 'hold)



					





								

				(objSendMessage gSource Nil "Turret Activated")



				; Remove the item from the player's list

				(objRemoveItem gSource gItem 1)

				)



		</Invoke>



		

	</ItemType>

<!---Ship--->


<ShipClass UNID="&scT7Turret;"

manufacturer= "Tenhove"

class= ""

type= "T7 turret"

mass=				"400"

cargoSpace=			"0"

thrust=				"0"

maneuver=			"3"

maxSpeed=			"0"



leavesWreck=		"5"

>



<Armor>

<ArmorSection start="0" span="360" armorID="&itReactiveArmor;"

areaSet="0,2,3,7" />

</Armor>



<Devices>

<Device deviceID="&itMarkIHowitzer;"/>

 <Device deviceID="&itCyclotronDeflectorIII;"/>

</Devices>



<Image imageID="&rsSmallShips1;" imageX="96" imageY="0" imageWidth="32" imageHeight="32" imageFrameCount="0" imageTicksPerFrame="0"/>



		<AISettings

			fireRateAdj=		"25"

			fireAccuracy=		"80"

			perception=			"4"

			noFriendlyFire=		"true"

			/>

</ShipClass>

Edit: it works when i spawn it in godmod to attack me...so I'm editing the code to include the invokable, since that may be the problem
Mischievous local moderator. She/Her pronouns.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

What is the last string "turret" doing in the sysCreateShip function? Also, if you give the ship the 'hold order, will it still attack?
Get your own Galactic Omni Device
Get it now. It's free!!
Image
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

I'm not sure. The invokable code was done by Prophet for an SM&M thing (a smart mine, IIRC), and the T7 is largely based off that old framework. I'll delete that bit and see what happens....if it breaks, I'll replace it, otherwise I'll keep it gone.

I can't order the ship to hold manually....I haven't got code for it in the turret, and my version of Godmode only lets me order things to either attack or gate. But ordering a hostile turret to Gate causes the exact same problem that the holding turrets have....only attacking within the firing arc of the howitzer (which I've added to stop it being so easy to kill. 20-facings sucks for a gun platform).

Edit: Removing that loose "Turret" *seems* to have fixed the problem. Not sure why it was affecting the turrets spawned via godmod though...since that codes on the INVOKABLE. Still, it's working now. :D
Mischievous local moderator. She/Her pronouns.
Post Reply