View unanswered posts | View active topics It is currently Sat Dec 28, 2024 3:31 pm



Reply to topic  [ 5 posts ] 
 Scene width 
Author Message
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1360
Location: USA
Reply with quote
Post Scene width
How would you go at finding the scene width with lua? I think it would be a function, but not entirely sure. Something like this:

Code:
          function "find scene width"
          end
       
          if self.X.Pos > Scene.Width then
                self.X.Pos = 0
          end


I think it would be something like that, just dont know exactly how to do it.

Thanks :)


Thu Jun 04, 2009 11:01 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Scene width
SceneMan.SceneWidth


Thu Jun 04, 2009 11:25 pm
Profile
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1360
Location: USA
Reply with quote
Post Re: Scene width
Grif wrote:
SceneMan.SceneWidth


K, thanks. And would it be "find SceneMan.SceneWidth" in the function?


Thu Jun 04, 2009 11:55 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Scene width
Should just be able to reference it directly; eg:

if self.Pos.X >= SceneMan.SceneWidth then
self.Pos.X = 0;
end


Thu Jun 04, 2009 11:58 pm
Profile
User avatar

Joined: Thu Mar 06, 2008 10:54 pm
Posts: 1360
Location: USA
Reply with quote
Post Re: Scene width
Grif wrote:
Should just be able to reference it directly; eg:

if self.Pos.X >= SceneMan.SceneWidth then
self.Pos.X = 0;
end


Thanks a lot, grif. Once i get on my other computer, ill update it and obviously give u creds.


Fri Jun 05, 2009 12:03 am
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.060s | 13 Queries | GZIP : Off ]