AI move before player (help)

I wanna make the AI move after the player start to moving or when the race start. I have no idea how to do that.
I’m new to the code area and it’s been very painful.

Upload project: https://www.mediafire.com/file/ftvnz1x1aibkre8/Teste.rar/file

Try a delay node and delay them 4 secs after the begin play

Tried, they just wait 4 seconds to move around. They didn’t wait for the player.

you could have the other cars movement component disabled then enable it when certain conditions are met, for example when your players velocity is greater than 0. show below is how this could work though this is just a test setup and i do not recommend using the exact setup. basic idea here is to have a timer or something that checks the players velocity then activates the opponents. this could also be done with a event called from the player or a interface call.

another method could be to disable all cars movement component then just activate them all at once so the player and the opponent can begin at the same time. you could easily inset this script right after the go is called.

note i tested with characters and not the vehicle template so things may work a bit differently.

He’s not reading the " Float > Float" node.
When it’s 0 unreal just ignore it and the AI don’t move.
When it’s 1, they still don’t move and when it’s “-1” they start before, like in the video.

I uploaded my project. I’m stuck on this for 3 days
https://www.mediafire.com/file/ftvnz1x1aibkre8/Teste.rar/file

the issue is your only checking the velocity once at the start of play. thats like saying ok the level just opened whats the player velocity, doesnt make much sense. what you need to a loop that checks the velocity at a regular interval until the condition becomes true. for this you could use a timer or just use a delay.

though for a racing game i would go with a method like the second method i mentioned previously. this would allow all cars to begin movement at the same time, but would not restrict the opponents from moving until the player moves so it would be more realistic. think of every racing game ever made, when the race starts everyone can move, the player can choose to do nothing but the opponents will start racing.

I did this thinking about what u said, and it’s working perfectly right now. Any suggestions?

I uploaded my project. I’m stuck on this ■■■■ for 3 days now
https://www.mediafire.com/file/ftvnz1x1aibkre8/Teste.rar/file

guess you got it working then. dont know why my other comments got deleted but as long as it works.

No comment was deleted. It was just that Klaus’s post(with following comments) was automatically sent to moderation due to profanity i suppose. You can see them down below now!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.