0 Members and 1 Guest are viewing this topic.
Le nom est pour l'instant SFT (Space Freight Transporter).
envisages-tu une version où le rack constitue l'entière capacité du SFT ?
//==========================================================// Controle clavier//==========================================================int taclasse::clbkConsumeBufferedKey (DWORD key, bool down, char *kstate) { if (!down) return 0; // Seulement pression d'une touche (pas de touche enfoncée) switch (key) { case OAPI_KEY_G: // appui sur la touche G hprRCS = CreatePropellantResource (PB_FUELMASSRCS); // hprRCS est le PROPELLANT_HANDLE // que tu as définis pour tes RCS; return 1; } return 0; }
switch (key) { case OAPI_KEY_G:// appui sur la touche G PROPELLANT_HANDLE hpr = CreatePropellantResource (PB_FUELMASS); // hprRCS est le PROPELLANT_HANDLE // que tu as définis pour tes RCS; return 1; }
brainstorm a écrit:C'est pour ca qu' il ne faut pas que tu le redeclares. Tu reinitialise la variable hpr (que tu auras declaree en tant que variable locale) avec createPropellantResource(tamassevoulue).
beacon[i].active = true;
// ********************* beacon lights ********************** static VECTOR3 beaconpos[8] = {{3,0,3.35}, {-3,0,3.35}, {3,0,-1.4}, {-3,0,-1.4}, {0,-3,3.35}, {0,3,3.35}, {0,3,-1.4}, {0,-3,-1.4}}; static VECTOR3 beaconcol = {{1,1,0.4}}; for (int i = 0; i < 8; i++) { beacon[i].shape = (BEACONSHAPE_STAR); beacon[i].pos = beaconpos+i; beacon[i].col = &beaconcol; beacon[i].size = (0.2); beacon[i].falloff = (1); beacon[i].period = (0); beacon[i].duration = (0.5); beacon[i].tofs = (2); beacon[i].active = false; AddBeacon (beacon+i); }
BEACONLIGHTSPEC beacon[8]; // light beacon definitions void SetNavlight (bool on); void SetBeacon (bool on); void SetStrobe (bool on); bool GetBeaconState (int which); // which=0:nav, 1:beacon, 2:strobe int i;
int FIRST_STEP_INIT_DONE;if(FIRST_STEP_INIT_DONE==FALSE){SetFuelMass(4000); FIRST_STEP_INIT_DONE=TRUE;}
static VECTOR3 beacon1pos = {{3,0,3.35}}; static VECTOR3 beacon1col = {{1,1,0.4}}; { beacon1.shape = (BEACONSHAPE_STAR); beacon1.pos = &beacon1pos; beacon1.col = &beacon1col; beacon1.size = (0.2); beacon1.falloff = (1); beacon1.period = (0); beacon1.duration = (0.5); beacon1.tofs = (2); beacon1.active = false; AddBeacon (&beacon1); } static VECTOR3 beacon2pos = {{-3,0,3.35}}; static VECTOR3 beacon2col = {{1,1,0.4}}; { beacon2.shape = (BEACONSHAPE_STAR); beacon2.pos = &beacon2pos; beacon2.col = &beacon2col; beacon2.size = (0.2); beacon2.falloff = (1); beacon2.period = (0); beacon2.duration = (0.5); beacon2.tofs = (2); beacon2.active = false; AddBeacon (&beacon2); }
switch (key) //{case OAPI_KEY_0: {if (beacon1.active == true)//if (beacon[i].active == true){beacon1.active = false;//beacon[i].active = false;beacon2.active = false;beacon3.active = false;beacon4.active = false;beacon5.active = false;beacon6.active = false;beacon7.active = false;beacon8.active = false;}else{beacon1.active = true;//beacon[i].active = true;beacon2.active = true;beacon3.active = true;beacon4.active = true;beacon5.active = true;beacon6.active = true;beacon7.active = true;beacon8.active = true;}return true;}
BEACONLIGHTSPEC beacon1; BEACONLIGHTSPEC beacon2; BEACONLIGHTSPEC beacon3; BEACONLIGHTSPEC beacon4; BEACONLIGHTSPEC beacon5; BEACONLIGHTSPEC beacon6; BEACONLIGHTSPEC beacon7; BEACONLIGHTSPEC beacon8; void SetNavlight (bool on); void SetBeacon (bool on); void SetStrobe (bool on); bool GetBeaconState (int which); // which=0:nav, 1:beacon, 2:strobe
bool SDSFT::clbkLoadVC (int id){ id = 0; SetCameraDefaultDirection (_V(0,0,1)); oapiVCSetNeighbours (-1, 1, -1, 2); //InitPanel(-1);// VC is -1 return true;}
SetMeshVisibilityMode (AddMesh (exmesh_tpl = oapiLoadMeshGlobal ("SD_SFT")), MESHVIS_EXTERNAL);SetMeshVisibilityMode (AddMesh (vcmesh_tpl = oapiLoadMeshGlobal ("SD_SFT_VC")), MESHVIS_VC);
MESHHANDLE vcmesh_tpl,exmesh_tpl;bool clbkLoadVC (int id);