Announcement

Collapse
No announcement yet.

Key bindings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Key bindings

    I am working on a vehicle with custom key bindings to control suspension. Before it was under fire/alt fire in the vehicle class, but I am having trouble adding the keybinding to the code.

    Code:
    if (tmp == "dsup")
            {
                ONSPRV_BS.ChangeSuspension(false);
                return True;
            }
            else if (tmp == "dsdown")
            {
                ONSPRV_BS.ChangeSuspension(true);
                return True;
            }
    i have that code, and when i compile it it gives an error. I tried copying the function into the vehcile class and making it simulated (hopeing it would be called) but it didnt compile as it didnt recognize the key variables sent to the function (EInput or something like that).

    How does one go about accomplishing this?

    #2
    I'm guessing that you want to press a key and then your vehicle does something. Try adding an exec function in your vehicle.

    So it would look like:

    Code:
    exec function DoSomeStuff()
    { 
      //Add what you want it to do here...like playsound..or go to a function..
    }

    Comment


      #3
      thanks! that worked great
      (i also got the same response from Capone- on #ut2004mods)

      Comment


        #4
        Yep, I wouldnt tell you a wrong answer. Sounds like you're making what I made a couple weeks ago. This is Capone- btw...

        Comment


          #5


          what were you working on a few weeks ago?

          Comment

          Working...
          X