I’ve actually played around a lot with the Blender Game Engine, Python, Logic Bricks etc.
My Question now:
I have created an object with an IPO Animation, which is started by MouseOver (for a game menu) and should be stopped when the mouse leaves the object.
Starting the IPO by MouseOver is not that problem, but how do I stop it when the mouse leaves. Everything I’ve tried results in playing the IPO to its end.
Do I have to use python? Or is it possible with logic bricks?
It’s possible (i used the same approach in my menu). You have to have your ipo actuator in ‘flipper’ mode though. When the mouse is over the object it will activate the ipo, when the mouse is taken off the object the ipo will be played in reverse. Note that it WILL stop the ipo at the frame it is at when your mouse is taken off the object. This isn’t a very good description - if you need more detail just say.
If you do use python then you need to use something like:
GameLogic.addActiveActuator.(object_ipo,1) # the number 1 means true (or activate in this sense)
if you want the animation to actually stop completely at the frame when the mouse leaves then use “Loop Stop”. The animation will stop when the mouse leaves, and then start playing from the next frame when the mouse goes back over again.
if you want the animation to actually stop completely at the frame when the mouse leaves then use “Loop Stop”. The animation will stop when the mouse leaves, and then start playing from the next frame when the mouse goes back over again.