Mouse follower *without any touch being pressed* - is it possible?
Hi all,
I'm wondering if I can create an actor that follows my mouse cursor around on a laptop based game without any touch having to be pressed anywhere.
I know how to make a mouse follower where touch is pressed and also where mouse position is 'down' so that when you press or touch on the screen, the actor will try to come towards your press, or the actor can be moved by the cursor. But is there any way of recreating the old school html or Flash mouse followers that follow a mouse around_ without anything having to be pressed_? Obviously this would only work with a computer based gamesalad game, not a touch screen, as it cant possibly know when your finger is hovering over the screen, but that's ok.
I've tried to do this by creating an 'otherwise' in my 'mouse button is down' rule, I've also tried it with mouse button 'up', I've also tried it with mouse button both down and up, but in all cases while it may work for a second when the preview opens, as soon as the actor reaches the mouse cursor, it stops and won't start again unless a touch is pressed somewhere on the screen. I want to stop that from happening.
Thanks
Comments
You can do this by constraining the actor's x/y position to the mouse x/y position without a rule. Just use two constrain behaviors.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Ahh thanks @tatiang I feel dumb for not thinking of that!!
You're welcome!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User