Outerra forum

User mods, screenshots & videos => Vehicles => Topic started by: wayne57 on May 07, 2014, 12:29:39 am

Title: having problems with vehicle script
Post by: wayne57 on May 07, 2014, 12:29:39 am
I'm really in the dark when it comes to scripts
i took the bmw script renamed it to my model
and named the wheels accordingly
i imported it with no problem but it still just sits there
I parented the body and wheels to an invisible frame
each wheel is independant of each other
when i tried it it just sits there
its a four wheeled vehicle
any help will be appreciated

thanks
Title: Re: having problems with vehicle script
Post by: PytonPago on May 07, 2014, 01:26:07 am
could ya send me the model ? (the whole folder from the "...packages/"your_username"/" location) I take a look and let ya know what was wrong ... just upload it to some file-hosting site or GoogleDrive.
Title: Re: having problems with vehicle script
Post by: PytonPago on May 07, 2014, 01:05:57 pm
I think ya send the link to dropbox on my private mail (..@azet.sk domain) - they're hawing some dumb policy about links (that renders them inflectional) so please send it to me via forum PM. ... sorry for that.
Title: Re: having problems with vehicle script
Post by: wayne57 on May 08, 2014, 01:08:33 pm
http://www.sendspace.com/file/4qxk0z (http://www.sendspace.com/file/4qxk0z)


should work now
Title: Re: having problems with vehicle script
Post by: PytonPago on May 08, 2014, 01:40:04 pm
For some reason, the script was blank (like after a clean import), maybe you re-imported it at some point and didnt notice ? (it normally clears the script-file) ... also, you could keep the original .objdef and rename the scriptfile to the same name (but yes, it does work ok like that too).

So if ya re-paste the BMWs script and rewrite the wheel lines to the objects you have there, it should work. The third version of his (https://drive.google.com/file/d/0B96RrTcNJsI2Z1V5WkdsWmNvLUU/edit) has nice sound-work too, you better copy-paste all the sound-files and the V8 folder into yours too (it will work whiteout sounds, but you have something to listen to and the error of not finding the sounds will not pop-up the little window in OT). But i may know why it maybe refused to work at your first attempt :

Code: [Select]
    this.add_wheel('wheel_FL', wheelparam);
    this.add_wheel('wheel_FR', wheelparam);
    this.add_wheel('wheel_RL', wheelparam);
    this.add_wheel('wheel_RR', wheelparam);

    this.load_sound("e90_onidle.ogg"); //idle
    this.load_sound("e90_offlow.ogg"); //off
    this.load_sound("e90_onlow.ogg"); //on
    chassis.basePitch = [ 1, 0.4, 0.4 ];             //base pitch for idle, off, on
    chassis.relVolumes = [ 0.8, 1, 1 ];
    chassis.soundEmitter = [b]"hood"[/b];

 - the last line there (think 51st in the script) links the sounds to a certain mesh - you should rewrite that too to one of your models meshes name. You may have to first define that mesh too, like:
 
Code: [Select]
...
    chassis.relVolumes = [ 0.8, 1, 1 ];
    chassis.soundEmitter = [b]"this.pb01"[/b];

... (at the function init vehicle section)

 [b]this.pb01[/b] = this.geom.get_joint([b]"FrontPannel_Button01"[/b]);

...


... but if ya like, just write the names of the model meshes and i fill the script and send it to you to look over. Also, the little buggy looks really nice.  ;)
Title: Finally figured out the car script
Post by: wayne57 on May 08, 2014, 11:51:24 pm
I know its crude but its my first vehicle i got running around
in Outerra thanks to all the help and post from other members
check it out and let me know (bouncy i know)

https://www.youtube.com/watch?v=znWa65agnA0 (https://www.youtube.com/watch?v=znWa65agnA0)
https://www.youtube.com/watch?v=wGhHNm0zfeQ (https://www.youtube.com/watch?v=wGhHNm0zfeQ)
https://www.youtube.com/watch?v=3Lf1ed-ZcVU (https://www.youtube.com/watch?v=3Lf1ed-ZcVU)


thanks

wayne57
Title: Re: Finally figured out the car script
Post by: necro on May 09, 2014, 02:03:31 am
Btw. this forum supports to post new entries in still existing threads.

@bump:

The car wont be this bumpy if you lower the max_suspension value. If you took the existing script, i guess you will have 0.2. I use 0.1 or 0.05 which makes it more stable.
Title: Re: Finally figured out the car script
Post by: wayne57 on May 09, 2014, 11:50:44 am
thank you for the info
much appreciated