Hi,i am a beginner and im trying to make my first project,and i have encountered a problem i dont know ,and cant find a solution to:

You made things very complicated for that simple goal.

You should implement things step by step, for changing color start with simple like this :

Note : i must add that the reference to Static mesh here isnt going to work if the Static Mesh is created inside PlayerController, i was just a way to show the basic connection with flip flop to achieve the changing color stuff.
I can help more but i need to see more of what you’re doing (your screen is incomplete)

hmm seems i didnt clarify enough.Im making a project for testing reflexes.Where a ball moves randomly and also randomly goes from red to green and when it changes color to green it should spawn a text saying “Press SPACE” and when u press space the ball stops and another text appears
giving you your reaction time like “442ms”.

As you can see from the picture, im a making a “simple” project where a ball randomly moves and it randomly changes color from red to green.And the problem, i have is when the ball changes color to green and i get a string "Press “Space” " i cant seem to make it so when i press the “Space” the ball stops moving.If anyone could help me a bit i would be very grateful.

New Attempt

Now if the problem is getting the measure betwen the color changing and the keypress by user, what you should try is :

• Create 3 float variables

  • StartTime
  • StopTime
  • ReactionTime

• When “Set material” is called, “set Start” variable with seconds / partial seconds of this function
• When keyboard Key is pressed “set Reaction” variable still with seconds / partial seconds of the same function

Perform a simple Stop - Start math operation, and you should “set ReactionTime” with the result.
• print ReactionTime (You can append a string version of it to a text like : "Your reaction time is : ")

Just remember that i may be inacurate in the sense that there are some computer delays adding to reaction time “screen display of the color, ACTUAL HUMAN REACTION TIME, keyboard talking to motherboard, etc…”

Hope this is a better answer !

Edit: you may have to manage the math operation with seconds (still can multiply by 1000 the (seconds - seconds) and add this to the final Reaction time result) But i think you get the idea

I better understand what you doing, but i still can’t clearly see the problem, i’ll try to update my answer anyway

I’m pretty sure i did what you suggested but i just cant seem to make the input of keyboard work.First i tried something simple to check the input of the keyboard(like pressing “G” to print a normal string) but it didn’t work.I used “enable input”,i checked if block input is checked(it was unchecked but i tried it with both),everything seems alright but for some reason when i press Space bar or what ever key i map it to, it wont register when i press it. :frowning:

This is completely unrelated, but your UE theme looks phenomenal (that is an actual editor image I assume) do you have a place where I can get it for myself?

And you might change the Execution flow after that because right now you’re setting ReactionTime right after Start. But you’ll figure it out after making space bar work

why did you circle the Auto Possess Player?

You need to make it auto possess by PlayerCointroller

Hey actually it’s a double plugin Electronic Nodes (straight lines) and Darker Nodes from marketplace, for the theme i know there are free alternative to get a flat design like this on github IIRC

Because you should set “Player 0” instead of disabled.

Edit : The right panel you see there is the “Class Default”, you can see the top Orange box showing it’s selected

• When you press Play in Editor the engine got automation processes and one of them is the automatic creation of basic-minimal-default stuff for you to be able to play.

• As it happens, a default PlayerController is created and will look for a Pawn or Character to “possess”, enabling input binding and control to it.

• Your ball_BP got as parent class (top right of the screen) : Character

• Then if you set this ball_BP to be set as auto-possessed by player 0 (first human player to connect the game) you will indeed be able to control it with your inputs, including “Space bar”.


And then you might understand why at my initial attempt to help you i made you put that stuff in player controller. Because Inputs will work for sure there if the right BP_PlayerController is set in GameMode.

Im sorry I replied so late,i took a little break for the holidays.I have read what you said and I have done that,and its successful,i can use inputs now :D. Now all I need to do is to figure out the random AI movement again(because it stopped working after i set the controller up) and I will be all set (i dont know if i should make the movement in the controller or the ball_BP).All in all thank you for helping me,thanks to you i have learned many things and im very grateful!The picture is of my current AI random movement,it was in my ball_BP but i have moved it to controller for some test.

Hey your reference to “Self” is a Controller, you wont be able to control it via AI Move To.
You need to put this in a character that will be possessed by AI Controller for this.

You can move object by other means than AI Move To.

You can try to use a Set Actor location with a Timeline node (timeline for smooth update every frame). So you will be able to keep the character under PlayerController possession.

If you find that your problem is solved you can set the answer as “solving the problem” Thanks man