ENEMY AI/ egg timer with wheels

really all im trying to do is make a randomizer run every 3 seconds and pick either left, right, up or down. it will move in that direction for 5 seconds then stop again, it will also detect if the player is within its sight using a proximity sensor. when the player is in the proximity it will start chasing you. but i cant get the randomizer working, can you guys help?

If you’re having programming issues, sending a screenshot of the code or a game link will greatly help people with solving your issue :slight_smile:

2 Likes

ok

also i cant get it to stop moving when its out of the range/sight

It looks like the wires are connected to “value” and not “in”. When something is sent to “Value”, it will change the condition (for example if the random outputs “4” then all of the filters will switch to “equal to 4”). To fix this just delete the wires from the random to values and instead connect them to “in” and it’ll work :). also I would recommend enabling “movable” and disabling “affected by gravity”.

1 Like