Page 1 of 1

x Location Help

PostPosted: Sun Feb 03, 2013 12:39 am
by moonforge
Hello!
I was wondering if there was a way to make the x coordinates of one actor equal the x coordinates of another actor. That way, it would appear that one actor would 'follow' the other from another part of the screen. I'm pretty sure that there's a variable for this, but I'm not sure where or what it is.
Help Appreciated,
~moonforge

Re: x Location Help

PostPosted: Sun Feb 03, 2013 12:43 am
by skydereign
moonforge wrote: I'm pretty sure that there's a variable for this

It's the x variable.
Code: Select all
x = other_actor.x; // where other_actor is the name of the actor you want it to follow

Do note, that will only work exactly like you want, if other_actor does not have clones, or you only want it to follow the first clone. If that isn't the case in your game, you'll have to use a little more advanced techniques, instead of just using the actor's default struct.

Re: x Location Help

PostPosted: Sun Feb 03, 2013 12:45 am
by moonforge
Thanks! That's exactly what I needed! + 1 to you!
(not that you need it) :wink:
~moonforge