Novice Question: How can I tell an object x+=1?

Hello, I am new to this, my programing knowledge is some Java script, but mostly I know scripting just from Game Maker’s GML.

That said, I’d like to know a bit of how to use Unity but I cannot find any tutorials on youtube that do not require the Physics Engine. I understand that said engine is very powerful and useful. but for my purposes I do not need it.

I would like to know how to tell a ball object to check every step of the game if the player is pressing the right arrow key, and if that is true that that x+=1; (at least that’s how it would be coded in a game maker game)

Thanks in advanced.

i suggest you to go find Teaching section in this forum and follow the WalkerBoys tutorial series and in a week you are going to be ready to create a VERY GOOD GAME!

Have a look here.

http://www.unity3dstudent.com/2010/07/beginner-b07-basic-translate-movement/

Should be easy enough to adapt this to move on a keypress.

if(Input.GetKey(KeyCode.LeftArrow))
{
    GameObject_Name.transform.Translate(0.1f * Time.deltaTime, 0, 0);
}

That should be enough for a simple “move when a key is hit.”

Ahh thanks. Your answer reminds me of another question I had though.

How do I set the games frame rate at the start of the game and any time during the middle of the game?

Why would you ever want to do that?

Like I said, I came from Game Maker, and soo- setting the frame rate manually is what I’m comfortable with.

I recommend you start here Learn

and work through, it’s done by unity themselves and is a wonderful resource.