Animated Ships on key press?

Freeform discussion about anything related to modding Transcendence.
Post Reply
phantomfoot
Anarchist
Anarchist
Posts: 18
Joined: Sun Mar 21, 2010 8:13 pm

Hi all,

Just joined the forum and trying to find out what is possible and what is not...

I know you can make animated ships (e.g. UFO mod), but is it possible to only animate the ship when a key is pressed, rather than have it animated all the time?

Just some wacky idea I've got...

Thanks
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

you can probably make a device that adds/remove an animated overlay in an event.
The overlay is going to get painted over the ship, so it's not going to be universal, maybe you can make a modded ship that uses it.
phantomfoot
Anarchist
Anarchist
Posts: 18
Joined: Sun Mar 21, 2010 8:13 pm

Thanks! Still trying to figure it all out, but hopefully that gives me enough to go on...
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

You would be hard pressed to make it work on keypress though... I have yet to find a reliable way to do that (tbh i don't think there is one)
phantomfoot
Anarchist
Anarchist
Posts: 18
Joined: Sun Mar 21, 2010 8:13 pm

Ok how about this then...

If the playership has a velocity of 0 (ie. stationary), then the ship has one image (can you use objGetVel for this? Or shpGetDirection?)

If the playership is moving, (Velocity > 0) then overlay another image

Possible?

Any pointers would be much appreciated :)

Thanks
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

That would require 2 overlays (or one overlay and a device)

Either a device or an overlay with an onupdate event to check the velocity of the ship, or some other criteria, and when it matches, add the overlay to the ship.

The overlay can hold the animation and, if designed properly, could be applied to nearly any ship.

If you're going to use the ship speed, use (sysVectorSpeed (objgetVel gPlayerShip)) so that you get a nice integer to work with rather than a velocity vector.

Hope that helps
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5528
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

Don't you also need the ability to detect the key press, for the majority of keys that can be used? (pretty much anything other than the spacebar... [onfire])
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
phantomfoot
Anarchist
Anarchist
Posts: 18
Joined: Sun Mar 21, 2010 8:13 pm

Thanks that's really good info.

My initial thought was to detect the key press, but if an overlay can be triggered by checking the velocity of the ship, then I was thinking key detection would not be required?
Post Reply