I’m trying to remake pong (as an educational exercise), so far I’ve found tutorials more for 2 (keyboard) players using WASD + CURSOR… but I’m trying to make a 1 player vs Computer version.
Most simple solution is to for example create global variable called RNG
Now you make event
Condition
Ball distance to Player2 is below 50 pixels (adjust distance to your needs i would go with going length of half of whole field)
Trigger once
Action
Change global variable RNG set to RandomInRange(0,5)
Now you copy your event from your screenshot above and paste it over in 3 events
in 1st event
Condition
Global Variable RNG is higher or equal to 0
Global Variable RNG is lower or equal to 3
Action
Here you add your action from screenshot BUT
Option A
You go for Player2.AngleToObject(Ball.Y)+RandomInRange(-15,+15)
Again numbers here need to be adjusted
Option B
Add action from your screenshot and in length in pixels go RandomInRange(200,400) instead of just 400
Now
You do same exact thing for 2nd event with condition
Global Variable RNG is equal to 4
And in action you do same exact thing where you give it lower random in range values
So if you for example had in above event
Player2.AngleToObject(Ball.Y)+RandomInRange(-15,+15)
You would go with
Player2.AngleToObject(Ball.Y)+RandomInRange(-5,+5)
3rd event
Condition
Global Variable RNG is equal to 5
Action
Here you simply paste what you have on screenshot
Idea is
RNG variable will pick random number from 0 to 5
So you have bigger chances to get number from 0 to 3
Which in action will make AI make dumb move
And lower chance if RNG will be 4 where enemy make less dumb move
And same chance as above if RNG will be 5 for enemy to make spot on move