Use Joystick Axis As Buttons?

Hello Unity3D.I have a question about joysticks?How can i make it that i can use the axis of my joystick as a button or buttons?For Example.I use a ps4 controller for my game and i want to use the right analog stick axis as a button like if i push the stick up and it would equal the jump button and if i push the stick down it would equal the block button if i push it to the right it would equal punch button if i push it to the left it would equal the projectile button.If anyone knows how to do this.Can you please tell me how?

Go to Edit → Input Settings and play around with the settings there.
To actually use the inputs in a script you’ll need to use strings, here’s a small example.

var playerMove  :   float = 5;

function Update()
    if (Input.GetAxis("Horizontal"))
        transform.localPosition.x += playerMovement * Input.GetAxis("Horizontal") * Time.deltaTime;
    if (Input.GetAxis("Depth"))
        transform.localPosition.z += playerMovement * Input.GetAxis("Horizontal") * Time.deltaTime;

Take my following note with a grain of sand…I could have been mis-understanding how sensitivity works…
Read more here:

A quick note that inputs have a sensitivity, meaning even a click of a key on a keyboard is not instanly ‘1’ on the axis, it will build up from 0 to 1 based on the sensitivity.

Changing those ‘== 1’ and ‘== -1’ to ‘> 0’ and ‘< 0’ will make the action instant as soon as the axis is pressed. (or setting the sensitivity of the inputs to 0)

I Love You!Thank you so much =D!