x Location Help

Non-platform specific questions.

x Location Help

Postby moonforge » Sun Feb 03, 2013 12:39 am

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
http://wannowandrichardsgames.weebly.com/

"You don't have to win to be a winner. You just have to pretend to be better than everyone else."

+ 1 please?
User avatar
moonforge
 
Posts: 45
Joined: Mon Jan 28, 2013 3:58 am
Location: CENSORED
Score: 8 Give a positive score

Re: x Location Help

Postby skydereign » Sun Feb 03, 2013 12:43 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: x Location Help

Postby moonforge » Sun Feb 03, 2013 12:45 am

Thanks! That's exactly what I needed! + 1 to you!
(not that you need it) :wink:
~moonforge
http://wannowandrichardsgames.weebly.com/

"You don't have to win to be a winner. You just have to pretend to be better than everyone else."

+ 1 please?
User avatar
moonforge
 
Posts: 45
Joined: Mon Jan 28, 2013 3:58 am
Location: CENSORED
Score: 8 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron