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
Animated Ships on key press?
- digdug
- 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.
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.
-
- 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...
-
- 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
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
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
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!
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!
- Aury
- 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!>
<New tutorials, modding resources, and official extension stuff coming to this space soon!>
-
- 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?
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?