How do i make it move after i take my cursor off it?

So im making a game where there is a enemy that moves but when put my cursor on it it stops and when i take my cursor off it starts moving again,i manage to make the enemy move using force then i make him stop using ‘‘the cursor/touch is on enemy’’ condition then ‘‘stop enemy (remove all forces)’’ action
The problem is that when i take my cursor off it the enemy wont move.I tryied to use the invert condition feature at a new ‘‘the cursor/touch is on enemy’’ condition and then add a force but it still wont work.
Please help

Can you provide a screen snip of the events you have described?

You don’t need to add any inverse conditions for this, something like this will work perfectly:


the object moves to the right until the cursor is over it, at which point it stops, when the cursor is no longer over the object it continues moving again.

But when i put it as an instant the enemy wont move at all

@weadsy1, OP may be applying the force conditionally, hence I asked:

Yeah I assume he is applying it conditionally and the logic is somehow interfering, @Moc as MrMen said could you please share a screenshot of what your events look like?

Well I see exactly what went wrong here. You might want to check out some of the tutorials to help you understand how the condition system works. The “at the beginning of the scene” condition only executes once, when you add a permanent force to the object that event is only executed one time. Once the cursor is no longer over the object, all its forces have been removed, and since the add force event is only executed once, the object remains stationary. The reason changing the force from permanent to instant doesn’t work is because the event is only being executed once due to its condition. Make your conditions and events look like the one I sent. In my screenshot, the instant force works because the event is being repeated every tick.

1 Like

I finnaly made it.Thank you for the help