AWW !!! Now i got it ! Thanks a
LOT Cameni ! Been working on this three days and was depressed as a mosquito on synthetic blood. Here is my way of doing it for all people to see :
//handle extra actions
function action(k,v,dt)
{
switch(k){
case ATurretX: this.turx.set(v); break;
case ATurretY: this.tury.set(v); break;
//this.log_inf("aOpenBool " + aOpenBool);
// Hood oppening
case AOpen: {
if (v == 1 && aOpenBool == true) {
this.geom.rotate_joint_orig(this.cc, 0, {x:1,y:0,z:0});
}
if (v == 1 && aOpenBool == false) {
aOpenTime = aOpenTime + (2 * 1);
this.log_inf("aOpenBool " + aOpenTime);
this.geom.rotate_joint_orig(this.cc, 1.75, {x:1,y:0,z:0});
}
if (v == 1) {
if (aOpenBool == false) {aOpenBool = true;}
else{aOpenBool = false;}
}
}break;
}
}
Actually just needed to change the "value" for "v" everywhere and giving all the stuff into - "case AOpen: { ... }break;" . So simple and so much hair lost till today !
Other question doe:
- headlights-script, its just added there, but light-sources not yet done in OT, is that right ? (well, if i dont do that the Billboard (texture) way at least for the bulbs), anyway will try to add some honk-honk sound, finally some fun stuff into my model !
- Is there a way to fix some of the views to a certain mesh ? I mean, if i will change the second-view position to be at the BM-21 targeting arm and i rotate it around, i will just stay at there whyte the camera, whyle the ocular goes away from me. I would like to change that position in accordance to the mesh im rotating. Maybe just make an addition to the action codes or somewhere else to define the mesh i chose and the camera position will update every image around its pivot whyte the mesh (maybe even have the "x:0, y:1, z:1" to determine, witch rotations from the mesh-rotation it should apply to the camera). I can think of a way of scripting this into the vehicle-script, but i think more people would like to use this (mostly mil-simmers find it useful).
So could be there the force app added to the scripts too later in some nice way ? ("AFire: this.geom.force_joint_orig ("
mesh", "
force strength", {x:0.87, y:0.25, z:0.64} -
to define the force vector from the mesh-pivot point)")
P.S.: Sorry for pushing so much for new apps. : )