Random touch keyboard

Hi,
I make a game in which I would like that when the player press a key on the keyboard it’s chosen randomly.

thank you for your reply

Is this for a widget? So when I press a, I get a random between a-z?

Like this, maybe:

In fact, in my game, there is a car. But this car to be able to advance her we have to press on touch of the keyboard which will be chosen randomly and she will be visible with a widget.
Sorry but I am novice.

What you said makes little sense to me. Consider explaining it a bit better.

Originally you said:

Hi, I make a game in which I would
like that when the player press a key
on the keyboard it’s chosen randomly.

That’s precisely what the script above does.


Now we’ve got a car that you can drive. You want to drive it using a random key on your keyboard?

Is this supposed to be one of those games where a prompt pops up with a key name and the user needs to adapt quickly and use that key?


Also, linking your other question here, no need to create duplicates:
https://answers.unrealengine.com/questions/835857/how-can-press-a-touch-but-its-chosen-randomly.html

Once you’ve gotten you answer here, consider closing or deleting the other thread.

Yes, my first question was not clear and I realized it later, I am sorry.
I am going to show with a screen shot:

On this road, to take forward the car, it is necessary to press on a touch of the keyboard which is going to be randomly chosen by the script. Every time the player press the good touch of the keyboard, the car will move forward a little and the player need to do this until the finish line .If the player does not press the good touch, the car will not move forward. It is in a way a game of speed.
And this touch which the player will have to press will be visible with a widget.
I hope to have been clear.
Thanks for your help Everynone.

I see what you mean, sounds pretty straighforward to implement. I’ll have a look at it to tomorrow morning.

the car will move forward a little

Is this based on distance moved or time?

after the car has traveled a certain distance
When the player presses on the good touch, the car moves forward and stops, he must repeat this action several times to the finish line

I have already programmed the fact of moves forward the car but he lacks the random of the touch as I have him say. The purpose of the player is to make the less time possible.(sorry if it’s not clear i use google translate)

Well, I can’t really help you if you don’t answer my question as the approach would be different in each case. When the player moves the car, do you want to show the next random key to press:

  • after some time

or

  • after the car has travelled some distance

It was actually easier to set up than I thought…

…but it’s challenging to play, actually!

Image from Gyazo

The widget is just a text block exposed as variable.

Thanks you so much !