Anteworld - Outerra Game > Modding: Importer, Tools & Utilities

How to register more actions associated with keys ?

<< < (2/2)

fly77:
Hi cameni. This is how the keys are bound and it does not have any effect on the camx and camy variables when the axis are registered in the cessna


--- Code: ---"name": "slew_azimuth",
                    "comment": "Slew azimuth command",
                    "important": true,
                    "bindings": [
                        {
                            "event_name": "Left",
                            "mode": "-"
                        },
                        {
                            "event_name": "Right",
                            "mode": "+"
                        }
                    ]
                },
                {
                    "name": "slew_elevation",
                    "comment": "Slew elevation command",
                    "important": true,
                    "bindings": [
                        {
                            "event_name": "Up",
                            "mode": "+"
                        },
                        {
                            "event_name": "Down",
                            "mode": "-"
                        }
                    ]
                },


--- End code ---

Strangely enough if I use the same registering of axis as below in a vehicle it works ! The same code pasted into the cessna however does not have any effect.


--- Code: ---  this.register_axis("air/sensor/slew_azimuth", {minval:-1, maxval:1, vel:1, center:1}, function(v){ camx = camx + 0.1*v;});   

  this.register_axis("air/sensor/slew_elevation", {minval:-1, maxval:1, vel:1, center:1}, function(v){camy = camy + 0.1*v;});
--- End code ---

cameni:
There may be another action using the same keys. I think they were used for side looks in cockpits ...

fly77:
hmm...with the default cessna or for that matter with any of the planes the arrow keys UP DOWN LEFT RIGHT do not have any effect on view direction, nor on anything else as far as I could judge.
Where might any such "hidden" actions be defined ? In the javascript there is nothing associated with these keys.

cameni:
Um, actually slew_azimuth & co is already used in aircraft, bound under action group 3 (sensors). Try disabling it via action_group(3, false). Not sure why it doesn't re-register to your action, perhaps because of the non-default group.

It's supposed to do something in sensor mode, but I guess this isn't active yet, or needs enabling sensor mode first ...

fly77:
Wow! it works !  thanks a lot !

Navigation

[0] Message Index

[*] Previous page

Go to full version