How to make an actor move to a mouse click then back to start point?
jweaver911
Member Posts: 439
I have this problem I'm trying to solve and would greatly appreciate it if someone could point me in the right direction.
I need to get a spawned actor to move to a click then almost immediately move back to its start point. I guess the closest example would be something like a hookshot or boomerang.
I'm still pretty new and I understand this is a pretty hefty concept, but once I figure this out, the rest will fall together for my game. It's going to be a kids/educational game.
Thanks!
I need to get a spawned actor to move to a click then almost immediately move back to its start point. I guess the closest example would be something like a hookshot or boomerang.
I'm still pretty new and I understand this is a pretty hefty concept, but once I figure this out, the rest will fall together for my game. It's going to be a kids/educational game.
Thanks!
Comments
If mouse button is down and is outside actor.
Move toward mouse X and Y.
If mouse is up, move toward pre-determined X and Y.
Or if you don't want to click again, set up a timer.
I really appreciate the effort in typing all of those examples out.
So I created a clickmanager game attrib (type integer value 1)
and a rule that is basically is like
on mouse down
timer (for .75 sec)
change attribute clickmanager value 0
otherwise clickmanager value 1
and on my actual interpolation action i have the rule say:
Conditions ALL
on mouse down
game.clickmanager = 1
...Do stuff....
======================
this isn't working for some reason. its still registering clicks even before that timer is up.
Any ideas? How do you guys manage these scenarios?