As the title says, I compiled the beacon code right, but it does not show up. Here is what I have.
The simulation mode runs fine, but when I press the command button nothing happens. I am sure it is a simple thing that can be fixed. Just wished I could fix it before starting a new thread. I edited the offset of the beacon multiple times to see if that was the case and had no success.
Code:
double Lights = 0;
double switched = 0;
double duration; // strobe duration
double tofs; // strobe time offset
BEACONLIGHTSPEC beacon1;
Code:
static BEACONLIGHTSPEC beacon1;
static VECTOR3 beacon1pos = {-19.81932,-11.73627,-6.477392};
static VECTOR3 beacon1col = {0.043, 0.161, 0.992};
beacon1.shape = (BEACONSHAPE_STAR);
beacon1.pos = &beacon1pos;
beacon1.col = &beacon1col;
beacon1.size = (2.1);
beacon1.falloff = (0.6);
beacon1.period = (1.13);
beacon1.duration = (0.9);
beacon1.tofs = (0.6);
beacon1.active = false;
AddBeacon (&beacon1);
Code:
int Spacecraft::clbkConsumeBufferedKey (DWORD key, bool down, char *kstate)
{
if (!down) return 0; // only process keydown events
// if (KEYMOD_SHIFT (kstate)) {
switch (key) {
case OAPI_KEY_K: // Engine start
if( engstart == 0 )
{
engstart = 1;
return 1;
}
if( engstart == 1 )
{
engstart = 1;
return 1;
}
if( engstart == 2 )
{
engstart = 3;
return 1;
return 0;
case OAPI_KEY_G: // Lights
if( Lights == 0 )
{
Lights = 1;
switched =1;
return 1;
}
if( Lights == 1 )
{
Lights = 0;
switched = 1;
return 1;
}
}
return 0;
}
}