This is what I have so far added to my future animation that I am making.
I am wondering what I would put to link it to the key command of "E". What type of commands would be involved because I know have done control surface animations which are automatic (basically). However I am not sure how to actually do it as of like this, press E, turbines start to spin, and press E to revert the action to stop the animation.
Code:
int Spacecraft::clbkConsumeBufferedKey (DWORD key, bool down, char *kstate)
{
if (!down) return 0; // only process keydown events
if (KEYMOD_SHIFT (kstate)) {
} else { // unmodified keys
switch (key) {
case OAPI_KEY_E: // "Engines"
if (!Playback()) StartEngines ();
return 1;
}
}
return 0;
}
Code:
class Spacecraft: public VESSEL3 {
public:
Spacecraft (OBJHANDLE hVessel, int flightmodel);
~Spacecraft ();
void clbkSetClassCaps (FILEHANDLE cfg);
int clbkConsumeBufferedKey (DWORD key, bool down, char *kstate);
I am wondering what I would put to link it to the key command of "E". What type of commands would be involved because I know have done control surface animations which are automatic (basically). However I am not sure how to actually do it as of like this, press E, turbines start to spin, and press E to revert the action to stop the animation.