Help with backwards firing ship

Freeform discussion about anything related to modding Transcendence.
Post Reply
Peter
Commonwealth Pilot
Commonwealth Pilot
Posts: 91
Joined: Wed May 07, 2014 1:11 am
Location: New Zealand

Hi guys.

I am creating a playership, but I want it to fire every weapon backwards. This means that if I install, say, a recoilless cannon, instead of firing forwards, it fires backwards. No matter what weapons I have, I want it to fire backwards.

This is my current code:

Code: Select all

<Events>
	<OnFireWeapon>
	 	(objSetItemProperty gItem 'posAngle '180)
	 </OnFireWeapon>
</Events> 
This is what is meant to happen: When the player fires their weapon, it changes the position angle so it fires backwards.
This is what happens: Nothing.

Thanks for any help in advance!
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 Try adding this in the ship’s <Devices> section and see if it does the trick:

Code: Select all

<DeviceSlot criteria="w" posAngle="180" posRadius="20" minFireArc="180" maxFireArc="180"/>
 You may need to adjust the posRadius or posAngle a bit to actually get the shot to fire from where you want it.
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
Peter
Commonwealth Pilot
Commonwealth Pilot
Posts: 91
Joined: Wed May 07, 2014 1:11 am
Location: New Zealand

Thank you!

By the way, what does 'Device slot w' mean?
My dream is to one day discover that someone who plays transcendence lives near me and goes to my school. Then I can finally have a friend.
---
Why must I keep running into that wall, impossibility?
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 <DeviceSlot> allows you to specify certain details about devices that go into a specific slot — weapon slot, shield slot, reactor slot, or so on. In this case, “w” specifies the weapon slot.
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
gunship256
Militia Commander
Militia Commander
Posts: 451
Joined: Sat Jul 25, 2015 11:41 pm
Location: repairing armor

If you want to weapons to fire backwards but not the launcher, you can change "w" to "w~l" (weapons not launcher).
Post Reply