Hi guys, I've a question. I'd want to make a button that press automatically GetAxis. How can I made a script like this: Code (csharp): if(Input.GetButton("anybutton")) {Input.GetAxis("Vertical")=1;} Thanks, Nik.
To setup Axises / Buttons it's under the Projectsettings --> InputManager (http://unity3d.com/support/documentation/Components/class-InputManager.html) The difference beetwen buttons and Axis are: Buttons are True/False (On/Off) While axis allow to query for the normalized value (0, 0.1, 0.2 --> 1) Hope that helps.
Is there any function that can press the button automatically with a script instead i pressed it by myself? For example: if(input.GetButton("G")) {press the button "Fire1" automatically (fire is pressed) }
I'm not sure of a way to do specifically what you're saying, but my first instinct would be to by pass the firing button bit and skip to the function the fire button calls.
if(buttonPress || Input.GetAxis ("Vertical") >0) // do whatever then just make buttonPress a boolean and set it to true while the button is being pressed and return it to false when it isn't.