Сhange the texture by pressing the keyboard in the blueprint

Hey! you need the picture to change when you press the keys on the keyboard. Assigned an array of variable textures to the object. How to switch integer on key press, please help

Hi @Tatyana_Lozinsky
the white line is the action flow ,
You correctly connected the begin event to: creating an instance and setting the reference variable .
You may need also to enable the input for your player 0

And when you hit 1,
you need another variable int that start with 0 “counter”.
when you hit 1, you need to check
if the Counter is < of the lengt of the array : add 1 set the texture parameter value using the counter in the get.
IF is not, you can set back the counter to 0, to cycle all the textures.
and again , set the texture parameter.

Beware in your screen you didnt connected the action line “white” to the set texture parameter !
So for now the only action key 1 does is setting the newvar to 0.

add a white line of action , from the set var 0 to set texture parameter