Trying to nail the actor to the other actor ;-)
gyroscope
I am here.Member, Sous Chef, PRO Posts: 6,598
Hi, I've an actor that slides in and out of screen, each time it does this it's over .8 of a second. I have another actor constrained to it (in fact there'll be up to 10 actors constrained to it). So with it constrained to the sliding actor, it slides in and out nicely, in tandem with this first actor; all well and good. But the centre points are constrained. But I'd want to move the x axis of the constrained actor(s) to be in different positions on the strip (sliding actor) (OK, it's an adventure game inventory...). I put in the Rules:
constrain actor self.Whateveritscalled.Position.x to (scene.Slideything.Position.x) + 39
Now it seems to lag when the slide comes in or goes out. Is there a neater and perhaps more elegant way of using the Constrain Attribute, so that the constrained actor sticks like glue to a moving actor, even though its moved off from the centre position, can any one tell me please?
Hope I've explained myself properly...
constrain actor self.Whateveritscalled.Position.x to (scene.Slideything.Position.x) + 39
Now it seems to lag when the slide comes in or goes out. Is there a neater and perhaps more elegant way of using the Constrain Attribute, so that the constrained actor sticks like glue to a moving actor, even though its moved off from the centre position, can any one tell me please?
Hope I've explained myself properly...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Comments
Perhaps you need to copy/pate the movement code rather than using constrain.
Another way maybe to use move to behavior with a timer every 0.001. Move to the actors xy with an offset.
Hope this helps
Cheers
Your second suggestion using a timer is interesting, I hadn't thought of that; I'll experiment with that as well.
Thanks again! :-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps