Outerra forum

User mods, screenshots & videos => Vehicles => Topic started by: wayne57 on June 16, 2014, 05:04:55 pm

Title: sherman tank armored car
Post by: wayne57 on June 16, 2014, 05:04:55 pm
last model of eight wheel sherman armored car runs fine


http://www.mediafire.com/download/om4i1x3cdanmp11/eightwheel.wayne57.otx (http://www.mediafire.com/download/om4i1x3cdanmp11/eightwheel.wayne57.otx)
Title: Re: sherman tank armored car
Post by: PytonPago on June 17, 2014, 02:48:54 am
You just need add two things - the wheel-parameter definer :

Code: [Select]
  this.add_wheel('wfl', wheelparam);
  this.add_wheel('wfr', wheelparam);
  this.add_wheel('wbl', wheelparam);
  this.add_wheel('wbr', wheelparam);

  this.add_wheel('wmfl', wheelparam); // the two sets of middle wheels
  this.add_wheel('wmfr', wheelparam);
  this.add_wheel('wmbl', wheelparam);
  this.add_wheel('wmbr', wheelparam);

and the force-defining one :

Code: [Select]
  steering *= 0.6;
  this.steer(0, steering);
  this.steer(1, steering);



  if(this.started>1)
    this.wheel_force(0, engine);
    this.wheel_force(1, engine);
    this.wheel_force(2, engine);
    this.wheel_force(3, engine);

    this.wheel_force(4, engine);
    this.wheel_force(5, engine);
    this.wheel_force(6, engine);
    this.wheel_force(7, engine);

mind that the force-ones have the wheel number (0 to 7) in the exact order, as you define the wheel-parameter, ones. So you better keep the look-out on witch you take here, if you dont want all be the force-driwen and the same is for the steering -- if you want the other wheels to rotate too, and you can define the rotation on a reverted, or a number-magnified value, like this:

Code: [Select]
  steering *= 0.6;
  this.steer(0, steering);
  this.steer(1, steering);

var  steeringmf = steering * 0.8; // - its better to use another variable, cause you would probably use some other function dependend on "steering" later and you just change it by the " steering *= 0.6;" for all the rest of the script.
  this.steer(2, steeringmf);
  this.steer(3, steeringmf);

var  steeringb = - ( steering * 0.7 );
  this.steer(6, steeringb);
  this.steer(7, steeringb);


Hope this helps a bit with the coding problem. :)
Title: Re: sherman tank armored car
Post by: wayne57 on June 17, 2014, 08:24:55 pm
top link for latest model
Title: Re: sherman tank armored car
Post by: PytonPago on June 17, 2014, 11:46:26 pm
Thats the 4 wheel ver. ... also, that speed !  :D
Title: Re: sherman tank armored car
Post by: wayne57 on June 18, 2014, 12:28:17 pm
changed link in above post to eight wheel
Title: Re: sherman tank armored car
Post by: PytonPago on June 19, 2014, 01:20:26 am
changed link in above post to eight wheel

will check this thingy ...
Title: Re: sherman tank armored car
Post by: PytonPago on June 19, 2014, 02:00:13 am
Wow ... you had a part of the script copy-pasted several times there ..

Title: Re: sherman tank armored car
Post by: PytonPago on June 19, 2014, 02:13:06 am
So here are the two corrected .js files .... for both 4- and 8-wheel versions  --- its a werry simple script here,, so you should be finding what when does what - probably the 6-times copy-pasted part made you think its nonsense, or that modifications didnt work as it took only the last sets ... doe i made the back-wheels rotate too in oposite direction - you can speculate with that script a bit to fit your thoughts about this little thingy.
Title: Re: sherman tank armored car
Post by: wayne57 on June 19, 2014, 01:34:14 pm
a BiGGGGGGGGGGGGGGG thank you
works fine I am going to study both
to see what i did wrong
again thank you so much

wayne
Title: Re: sherman tank armored car
Post by: PytonPago on June 19, 2014, 02:13:41 pm
(http://www.troll.me/images/the-chuck-norris/no-problem.jpg)