Data Realms Fan Forums http://45.55.195.193/ |
|
How do I get the position offset for placing X off the map? http://45.55.195.193/viewtopic.php?f=73&t=15766 |
Page 1 of 1 |
Author: | numgun [ Wed Jul 08, 2009 3:22 pm ] |
Post subject: | How do I get the position offset for placing X off the map? |
I'm making this vehicle and I want to move the driver off the scene above the top border. How do I get the position for placing the driver no matter what scene it is? I could imagine its something like getting the scene dimensions and then basing off those I would move the driver where I want. But how do I do that? |
Author: | Areku [ Wed Jul 08, 2009 4:01 pm ] |
Post subject: | Re: How do I get the position offset for placing X off the map? |
Hmm. Let me see. If I remember correctly, you could use this: Code: for actor in MovableMan.Actors do alpha = SceneMan.SceneHeight; actor.Pos.Y = (alpha/2) + 10; end Not totally sure, but should work. |
Author: | Duh102 [ Wed Jul 08, 2009 4:57 pm ] |
Post subject: | Re: How do I get the position offset for placing X off the map? |
Wait, you want to put him above the map? Then just use a negative number for his Y. 0,0 is the top left corner of the map. |
Author: | Areku [ Wed Jul 08, 2009 5:02 pm ] |
Post subject: | Re: How do I get the position offset for placing X off the map? |
Wait, then 0,0 is the top left corner? I could swear it was the center. Oh well, whatever. Ignore my post above, please. |
Author: | numgun [ Wed Jul 08, 2009 5:53 pm ] |
Post subject: | Re: How do I get the position offset for placing X off the map? |
Wow, that was simple. And I was already thinking to use SceneWidth and SceneHeight and a whole lot of other code. Thank you! |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |