Outerra forum

User mods, screenshots & videos => Vehicles => Topic started by: cameni on April 21, 2013, 10:13:00 am

Title: Additional controls for vehicles
Post by: cameni on April 21, 2013, 10:13:00 am
I'm going to add a couple of extra keys into the vehicles, that can be handled within the vehicle script and used to control additional stuff, such as doors, horn, turrets etc. Although vehicle scripts can decide to assign keys to arbitrary functionality, I want to have some predefined (doors, horn ..) and some extra keys without a specified purpose.

What input actions should be predefined (even if not used now)?
Title: Re: Additional controls for vehicles
Post by: mLichy on April 21, 2013, 10:37:41 am
Oh nice, so I could, right now, add a key to animate the door, ect?  Or am I misunderstanding that part?

Input Actions/Keys to Add:

- Open Hood/Bonnet
- Open Trunk/Boot  (Could be considered a door if hatchback?)
- Open Doors (1-5?)
- Sound Horn
- Window Control (not sure how to best handle this)
- Turn On/Off Windscreen Wipers


Title: Re: Additional controls for vehicles
Post by: cameni on April 21, 2013, 11:00:53 am
I need to add a new event into the vehicle physics interface that you'll be able to handle in the script, it will be possible in the next update. Now I need to know what input actions should be added into the vehicle configuration, where you can bind keys or joystick axes to them.
Title: Re: Additional controls for vehicles
Post by: ZeosPantera on April 21, 2013, 11:05:37 am
Horn, Parking_Lights, Head_Lights, Aux_Lights, Radio_Toggle

Open_Door_L, Open_Door_R, Open_window_L, Open_window_R, Hood, Trunk, Lock_Vehicle (for multiplayer)

Turret_left, turret_right, turret_up, turret_down (then you have to have analog inputs.  Turret_X, Turret_Y) and a SLOW_MODIFIER(so you can hold and slow down rotation)

FIRE!, Cycle_Weapon, Fire_1, Fire_2, Fire_3, Fire_4, Fire_5

Shift_up, Shift_down, Neutral, Reverse, First, Second, Thrid, Fourth, Fifth, Sixth, LOW_GEAR

Emergency_Brake_Momentary, Emergency_Brake_Toggle, AUX_1, AUX_2, AUX_3, AUX_4, ETC

_________________________________________________________

Obviously these are many of the things I could see being used but not everything. I have been thinking about my rFactor and Insterstate76 background. Vehicular Homicide is a sort of hobby of mine.

Some of the above actions should be toggle, some momentary and some should require you in real life to HOLD (the Reverse thru Sixth gear for example)

I assume you would be separating Planes and Boats from these sort of vehicles.
Title: Re: Additional controls for vehicles
Post by: cameni on April 21, 2013, 11:41:33 am
Just to explain the supposed final state - since there are lots of simulator fan(atic)s who want every conceivable action to be controllable, ultimately it should be possible to add arbitrary input actions to any vehicle (or class of vehicles), and handle them in the vehicle's physics script. However, most people will want just simplified controls, that can be configured globally for all vehicles in the configuration menu. Here we are talking about those common controls. Aircraft have their own controls page.

In OT the input actions are of two types: volume (0..1) or symmetric (-1..1). You can bind either buttons or axes there, and whether it's toggling or holding or momentary - that depends on how the script decides to handle it.

Normally the keys are bound without modifiers (no shift/ctrl/alt), but the state of these keys will be available to the script. For example, you could bind key o to open the windows, but the script will do something different when shift is being held (like closing them instead).
Title: Re: Additional controls for vehicles
Post by: ZeosPantera on April 21, 2013, 12:16:41 pm
Well the simplified list would be... between>

-----
Toggle_reverse (I don't like the console hold brake system)
&
Park_Toggle (because again the current hold doesn't work if you are sliding down hills)
-----

OR personally would just have a Shift_Up, Shift_Dn set so that you could cycle through the common gears.. (Park > Reverse > Neutral > Drive > 3 >2 >1) with a basic OSD and indicator showing what gear you are in.

-----
and
Horn, lights, e-brake, doors, Ignition, Starter, Aux
Title: Re: Additional controls for vehicles
Post by: jeffmorris on April 21, 2013, 09:34:30 pm
I would like these input action/keys:

Ignition (some vehicles have separate ignition and starter switches)
Seat adjustments
Open and close windows
Open and close doors
Open and close hoods, trunk lids, tailgates, and liftgates
Sun visors
Mirror adjustments
Title: Re: Additional controls for vehicles
Post by: ZeosPantera on April 22, 2013, 02:42:32 am

Seat adjustments


Not sure how that would work currently since the cockpit view is coded into the .js and requires a reload. Cameni?
Title: Re: Additional controls for vehicles
Post by: cameni on April 22, 2013, 02:46:34 am
You can set the FPS camera in the vehicle already. In fact you must set it.
Title: Re: Additional controls for vehicles
Post by: ZeosPantera on April 22, 2013, 02:49:52 am
You can set the FPS camera in the vehicle already. In fact you must set it.

Yes but can you move it dynamically without a reload.
Title: Re: Additional controls for vehicles
Post by: cameni on April 22, 2013, 02:52:39 am
Yes, it's set for vehicle instance in init_vehicle
Title: Re: Additional controls for vehicles
Post by: deathevor on April 22, 2013, 10:22:23 am
-Radio :)

Would be nice to have a radio in vehicle :)
Title: Re: Additional controls for vehicles
Post by: Anthony817 on April 22, 2013, 10:25:04 pm
Wow! Glad I bought this a week ago, looks like the updates and features are coming along nicely! I was wanting Interior and head/tail lights for night driving, but a turret and the ability to fire weapons to allow terrain deformation in vehicles would be great!

What about having tactical nukes in game for lobbing over mountainsides to wreak havoc on the ground below? 

Anybody feel like making a APC or Tank with a tactical nuke launcher? :)
Title: Re: Additional controls for vehicles
Post by: KelvinNZ on May 01, 2013, 01:50:28 am
Hmmm, additional controls, let's see...

Oh, and I know some of these would be in a separate aircraft script but I will vomit my ideas here anyway, choose what you will of them, if any  :)

Aircraft:
Separate control for canopy open and close (could use standard door function here) or multiple doors like baggage compartment, engine bay oil flap, cowl flaps, etc...
Aircraft carrier functions, maybe tail hook control, aircraft lift pad from internal hangar bay and also the raised area behind the jet that contains the jet blast.
Aircraft beacon, Navigation, strobe, and landing lights. (there could be multiple configurable keys for lights in general and you could choose which keys control which lights, more universal this way)
External object manipulation (i.e aircraft hangar and garage, door open and close)
Fuel jettison function and fuel flap/cap so if you can drop fuel if you're too heavy (future planning of course here)
Spoilers or speed brakes
Separate function for bomb drops (this could be great for some sort of future game) blowing up dams or something from an Avro Lancaster; bomb bay doors.
There are many cockpit functions that I could mention here but i'll just keep it simple and leave it at that.

Ground Vehicles:
Mirror adjustment on vehicles
handbrake (as well as foot brake) function
Automatic and manual gear change mode
Raising or lowering suspension

Camera reset function to a predetermined angle based on what view mode you are in.
More external view functions
Internal vehicle camera adjust (raise head view, lower head view, left and right head adjustments)
Title: Re: Additional controls for vehicles
Post by: mLichy on May 04, 2013, 06:57:31 pm
So I hooked up my bonnet/boot (hood/trunk) to move using the O key, with AOpen.  But, is there a way to animate over time like in UpdateFrame?  Right now it's just On/off. 

Either way though, it's cool to see it moving/opening :)  Thanks for the update.

Thanks!
Title: Re: Additional controls for vehicles
Post by: cameni on May 05, 2013, 12:56:37 am
You can check how the MiG29 script animates the parts. In the action method you can set a flag indicating that something should open, and then in the update method you'd compute the angle based on the time elapsed from when the flag was initially set (using an helper var that accumulates the delta time provided in the update_frame method).

There will be also support for complex animations done in the 3D modeler, that are controlled by setting a value in range 0..1, but then you'll still have to compute the value from the elapsed time.
Title: Re: Additional controls for vehicles
Post by: mLichy on May 05, 2013, 10:05:36 am
Ah, ok.  Actually I looked at the script the other day, I think I remember seeing something like this. 
I'll check it out again, thanks!
Title: Re: Additional controls for vehicles
Post by: cameni on May 05, 2013, 11:20:16 am
Hmm thinking maybe we could wrap some of these useful bits of functionality in a helper script that gets automatically included before each vehicle script, since this is a fairly regular thing.
Title: Re: Additional controls for vehicles
Post by: mLichy on May 05, 2013, 02:16:54 pm
Yeah, that sounds like a good plan. 
Title: Re: Additional controls for vehicles
Post by: bugsblake on May 19, 2013, 02:41:27 pm
just a couple of suggestions for cars

indicaters and hazard lights
high/low beam toggle - better for night driving
open roof - can be used for sun roof or convertable soft top/hard top
Title: Re: Additional controls for vehicles
Post by: bugsblake on May 20, 2013, 03:04:58 pm
another thought! something i feel has been missing from every game/sim ever made. being able to put your foot to the floor! while on foot we can always walk AND run! so why not in a car if 'w' is to drive normal, holding 'shift' and pressing 'w' would make the car accelerate as fast as possible! so you can drive around like normal "town" driving but when you need to move it fast you can hold 'shift' and floor it! i think it would really add to the realisim!

and one other thing, not the right place im sure but any chance in adding a cinematic camera? great for fly bys/drive bys!

ps. if i edit a post, like the one above also by me! will it show 'new' on the forum or will it just update? just wonder if things will be missed by editing post? thanks
Title: Re: Additional controls for vehicles
Post by: Atrax on June 09, 2013, 05:52:21 pm
just a couple of suggestions for cars

indicaters and hazard lights
high/low beam toggle - better for night driving
open roof - can be used for sun roof or convertable soft top/hard top

What Bugs said. These are most important for cars imo. High/low beam, indicators would be nice too since you don't see them in any game. Open/close roof would be nice for convertibles although I could live without that. Also windscreen wipers (if this game will have changing weather this is be a must for sure).
Maybe some stuff for off-road vehicles could be predefined too, like tire pressure adjustment, low/high gear, diff lock (this would be also useful for street cars too, so you can toggle road/drift driving/racing). Now I don't know how realistic physics will be in this game, but if aim is simulator or at least close to simulation, than these would be great things to have, if not down right necessary.
Title: Re: Additional controls for vehicles
Post by: bugsblake on June 25, 2013, 10:01:43 am
hi all! i wanted to ask here if we can have mouse steering added! so to have mouse left and right axis mappable!

not all of us have steering wheels to use but mouse steering is as close as we can get without a wheel!

i played a few games with mouse steering like live for speed and race 08 and a few other racing sims and having mouse steering really gave me that extra control over the car that was missing from every other sim!

so angrypig, can you add this please! im sure others here would benefit from it.

thanks