Changing ships and gPlayership

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Xephyr
Militia Captain
Militia Captain
Posts: 857
Joined: Fri Dec 14, 2007 1:52 am
Location: Orion Arm, Milky Way
Contact:

I thought that changing ships updated gPlayership to the new ship object, but when trying to refer to gPlayership in a behavior type, changing ships seems to break it.

Code: Select all

shpOrder requires target [escort] ### (shpOrder gSource "escort" gPlayership) ###
Is there a way to refresh gPlayership to point to the new space object, or is this a bug?
Project Renegade (Beta) : "The Poor Man's Corporate Command!"
Real programmers count from 0. And sometimes I do, too.
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

Shouldn't need to. ChangeShipMod automatically sets gPlayership as the new ship many times. Unless something in 1.7 broke it. EDIT: Just checked, working fine. It puts a new reactor into gPlayership no problems.

I've been messing about with wingmen and it's driving me nuts. Possibly escort needs the 'formAngle value set as well (Ty, PM).
So;

Code: Select all

(shpOrder gSource escort gPlayership 'formAngle)
where formAngle is a number, 0-360, representing degrees from (IIRC) straight up anticlockwise which positions the escorting ship at that angle. There's another value as well that determines distance from the playership. See PSD for details.

Otherwise what's the code it's in?
Last edited by relanat on Tue Mar 21, 2017 5:39 am, edited 1 time in total.
Stupid code. Do what I want, not what I typed in!
User avatar
Xephyr
Militia Captain
Militia Captain
Posts: 857
Joined: Fri Dec 14, 2007 1:52 am
Location: Orion Arm, Milky Way
Contact:

No, escort doesn't need formAngle defined. The code works as it should until the player changes ships; The problem is that gPlayership apparently isn't changed to the new ship object.

plyChangeShip is supposed to update gPlayership to point to the new ship, but that seems to be broken.
Project Renegade (Beta) : "The Poor Man's Corporate Command!"
Real programmers count from 0. And sometimes I do, too.
Post Reply