Game Development Community

SPC (X,Y)

by rennie moffat · in Torque Game Builder · 08/04/2009 (7:58 am) · 24 replies

Hi I am doing some position type coding and have come across "SPC" repeatedly.
An example would be....
(x, SPC y)


It seems to sit in between the X and Y. I am just trying to figure out what this is.

About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.

Page«First 1 2 Next»
#21
09/30/2009 (4:59 pm)
Exactly! There won't be a comma or parenthesis. So what you'll get back is

"-30 45 30 -45".

The "-30" is the x-component of the top left. The "30" is the x-component of the bottom right. Therefore, the right-hand side of your screen is at "30".

But how do you get JUST the "30" out and store it into a variable? Look at the getWord functions again.
#22
09/30/2009 (5:58 pm)
oh! okay.



Shit,
that makes sense. see for me I need some one to answer my question, awesome. The key will be the fact it is called.


ok

so something more like

getCurrentCameraPosition(%this.sceneWindow2D.getWord(xL, 0), getWord(yT, 1), getWord(xR, 2), getWord(yB, 3));





there are bit of this I am unsure of like, sceneWindow2D, am I calling this, should I be calling this? or should it be more like this?


%this.PlayerShip.getcurretCameraPosition(%this.sceneWindow2D.getWord(xL, 0), getWord(yT, 1)....




:?
#23
09/30/2009 (6:09 pm)
For instance, let me bring you a little closer to my situation...


here is some code I am working on from this thread, your studies sensai william. hi (supposed to sound like im japanese)


$PlayerShip.getPosition()

if ($PlayerShip.getPosition.getWord(0) < %this.getCurrentCameraPosition.getword(0)) 
{
%this.onWorldLimit(%clamp);
}



would this be closer?













You see
Specifically, how do I define the camera Position x 1? it will be defined as getWord(0)
#24
09/30/2009 (6:19 pm)
actually, I have just popped this code,
this seems to make more sense but as to how to plug it in now, into my .cs file, confuses me.



inside what function would I put this?



if ($PlayerShip.getPosition.getWord(0) < %this.sceneWindow2D.getCurrentCameraPosition.getword(0))   
{  
%this.onWorldLimit(%clamp);  
}  

if ($PlayerShip.getPosition.getWord(2) < %this.sceneWindow2D.getCurrentCameraPosition.getword(2))   
{
%this.onWorldLimit(%clamp)
}



would this make sense? to put it in here?

function playerClass::worldLimit()
{
$PlayerShip.getPosition() 
}

  
if ($PlayerShip.getPosition.getWord(0) < %this.sceneWindow2D.getCurrentCameraPosition.getword(0))   
{  
%this.onWorldLimit(%clamp);  
}  

if ($PlayerShip.getPosition.getWord(2) < %this.sceneWindow2D.getCurrentCameraPosition.getword(2))   
{
%this.onWorldLimit(%clamp)
}


Page«First 1 2 Next»