View unanswered posts | View active topics It is currently Sat Apr 27, 2024 6:11 am



Reply to topic  [ 5 posts ] 
 How do I get the position offset for placing X off the map? 
Author Message

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post 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?


Wed Jul 08, 2009 3:22 pm
Profile
User avatar

Joined: Fri Oct 17, 2008 9:46 pm
Posts: 5212
Location: The Grills Locker.
Reply with quote
Post 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.


Wed Jul 08, 2009 4:01 pm
Profile WWW
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post 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.


Wed Jul 08, 2009 4:57 pm
Profile
User avatar

Joined: Fri Oct 17, 2008 9:46 pm
Posts: 5212
Location: The Grills Locker.
Reply with quote
Post 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.


Wed Jul 08, 2009 5:02 pm
Profile WWW

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post 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!


Wed Jul 08, 2009 5:53 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.086s | 17 Queries | GZIP : Off ]