reverse nitro on byggys

Ask questions, discuss ideas, get answers
rydal
Posts: 9
Joined: Tue Nov 13, 2012 5:37 pm

reverse nitro on byggys

Post by rydal »

Hello

I'm pretty new at modding but i got a server with a modded 1942 Midway and i have the nitro buggys and some fast small boats and torpedoboats.
I played on a server that has nitro forward and backwards on the buggys but i don know how to mod back nitro on the left mouse button.

Hope some one can help me with this.

<<SM>> Rydal [SWE] // Andreas

Server: Swedish Mafia <<SM>>
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: reverse nitro on byggys

Post by Senshi »

The same way as regular nitro, just turn the nitro engine backwards (ObjectTemplate.setRotation 180/0/0) and assign the control to ObjectTemplate.setInputToRoll c_PIFire (instead of c_plAltFire).

If you have both codes in, your vehicle will boost forward with right click and reverse with left click.

EDIT: Be advised that this way it will be possible to fire both nitros at the same time, probably causing a lot of messy jittering on the vehicle as it tries to accelerate both forward and backward at the same time, as both engines are perfectly opposite of each other. Imagine it like a tractor pulling ;) .
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: reverse nitro on byggys

Post by Swaffy »

You have two engines. One for reverse and one for forward (if you want both).

Check out this page here for more info:
http://bfmods.com/tutorialc538.php?page=nitrous.html

Also, my mod has a rocket-propelled Jeep Willy. It is on the maps "A_Test_Map" and "El_Alamein".
Last edited by Swaffy on Mon Nov 26, 2012 6:07 pm, edited 1 time in total.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
rydal
Posts: 9
Joined: Tue Nov 13, 2012 5:37 pm

Re: reverse nitro on byggys

Post by rydal »

I tried some codes but it dident work.

Maybe to advance for me :(

I just copied this code and the nitro forward works fine (ObjectTemplate.Active willyComplex) :

ObjectTemplate.Active DPVComplex
ObjectTemplate.addTemplate KatyushaRocket_Engine
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.setRotation 0/0/0

ObjectTemplate.Active KatyushaRocket_Engine
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setInputToRoll c_PIAltFire
ObjectTemplate.setEngineType c_ETPlane
ObjectTemplate.setMaxSpeed 0/0/100000
ObjectTemplate.setAcceleration 0/0/100000
ObjectTemplate.setTorque 50.0
ObjectTemplate.setDifferential 30.0
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: reverse nitro on byggys

Post by Swaffy »

That's because that code was only made for forward. The "ObjectTemplate.setRotation 0/0/0" means it's pointing forward. Make it "180/0/0" to turn it around. Also note that the code works for Desert Combat, hence it using the "DPVComplex", the DPV is a Desert Combat vehicle.

What I did was used that code as a beginning template/example and built my own new code with it. I created a new rocket engine so that my Katyusha rockets aren't harmed when doing the nitrous mod. It took a bit more work, but my normal Katyusha rockets were no longer broken.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

SSM modding

Post by freddy »

You have to use two different engines, the reason you can use and modify the KatyushaRocket_Engine is that it has no networkinfo so you will have to find one more engine without networkinfo.

Some examples on the top of my head is three different torpedo engines, the PT boats has PT_FrontLandEngine and PT_BackLandEngine for example

Theres propably more engines you can use if you search around in objects.rfa. You can also try and build your own engine, it works in some maps but if you do, dont put the code in ObjectSpawnTemplates.con, midway is sensitive with that for some reason.
rydal
Posts: 9
Joined: Tue Nov 13, 2012 5:37 pm

Re: reverse nitro on byggys

Post by rydal »

When i try this code i got disconnected from server and my frends to.

Im modding Origin v1.612 El al 1942
Forward nitro works fine but when i add the reverse nitro we get disconnected from server

rem *-----------------------------------------------------------------------------*forwardnitro

ObjectTemplate.Active WillyComplex
ObjectTemplate.addTemplate KatyushaRocket_Engine
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.setRotation 0/0/0

ObjectTemplate.Active KatyushaRocket_Engine
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setInputToRoll c_PIAltFire
ObjectTemplate.setEngineType c_ETPlane
ObjectTemplate.setMaxSpeed 0/0/100000
ObjectTemplate.setAcceleration 0/0/100000
ObjectTemplate.setTorque 50.0
ObjectTemplate.setDifferential 30.0

rem *-----------------------------------------------------------------------------*forwardnitro

ObjectTemplate.Active KubelwagenComplex
ObjectTemplate.addTemplate KatyushaRocket_Engine
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.setRotation 0/0/0

ObjectTemplate.Active KatyushaRocket_Engine
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setInputToRoll c_PIAltFire
ObjectTemplate.setEngineType c_ETPlane
ObjectTemplate.setMaxSpeed 0/0/100000
ObjectTemplate.setAcceleration 0/0/100000
ObjectTemplate.setTorque 50.0
ObjectTemplate.setDifferential 30.0

rem-------------------------------------------------------------------------------------backnitro

ObjectTemplate.Active WillyComplex
ObjectTemplate.addTemplate DaihatsuEngine
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.setRotation 180/0/0

ObjectTemplate.Active DaihatsuEngine
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setInputToRoll c_PIFire
ObjectTemplate.setEngineType c_ETPlane
ObjectTemplate.setMaxSpeed 0/0/100000
ObjectTemplate.setAcceleration 0/0/100000
ObjectTemplate.setTorque 50.0
ObjectTemplate.setDifferential 30.0

rem-------------------------------------------------------------------------------------backnitro

ObjectTemplate.Active KubelwagenComplex
ObjectTemplate.addTemplate DaihatsuEngine
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.setRotation 180/0/0

ObjectTemplate.Active DaihatsuEngine
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setInputToRoll c_PIFire
ObjectTemplate.setEngineType c_ETPlane
ObjectTemplate.setMaxSpeed 0/0/100000
ObjectTemplate.setAcceleration 0/0/100000
ObjectTemplate.setTorque 50.0
ObjectTemplate.setDifferential 30.0
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: reverse nitro on byggys

Post by Swaffy »

That's because you activated the DaihatsuEngine.

If you're willing to download a mod to see the code yourself, you can download mine. It's the "WillyNitro" in the Land vehicles section. I created a new engine, it's best to do that instead of using existing engines.

Here are the file locations with code relating to my nitro:
Vehicles/Land/KatyushaRocket/Objects.con
Vehicles/Land/KatyushaRocket/Weapons.con
Vehicles/Land/WillyNitro/Objects.con
Vehicles/Land/WillyNitro/Weapons.con

You might need to create two engines (such as "NitroEngineF" and "NitroEngineR") so that you can have one engine for forward ("NitroEngineF" with "c_PIFire") and one for moving reverse ("NitroEngineR" with "c_PIAltFire").
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: reverse nitro on byggys

Post by freddy »

He is Server Side Modding swaffy, theres no guarantee it works building own engines SSM but i think its worth a try.

If you dont use Daihatsu boats you can try rem out the DaihatsuEngines network info directly in objects.rfa
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: reverse nitro on byggys

Post by Swaffy »

Oops. Well, then I have nothing. Sorry guys.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply