Game Development Community

Quick Eyed Professor

by rennie moffat · in Torque Game Builder · 10/27/2009 (1:09 pm) · 2 replies

Hi I am having some trouble getting this code to fly. I am wondering if there is a quick eyed professor who can spot it, if "it exists, and tell me the error of my ways?

function Cube::onLevelLoaded(%this, %scenegraph)
 {
 	sceneWindow.setUseObjectMouseEvents(true);
 	 %this.setUseMouseEvents(true);
 }
 
 
 function sceneWindow2D::onMouseDown(%this, %modifier, %worldPosition, %clicks)
 {
 	%this.Cube.moveTo(%worldPosition);
 	%clicks = 3;
 }
 
 function Cube::moveTo(%this)
 {	 	 	
 	 	if(sceneWindow2D.Cube.MoveTo(%worldPosition) = true)
 	 	{
 	 		%this.Cube.moveTo(sceneWindow2D(%worldPosition);
 	 		%this.Cube.setLinearVelocity(%velocity) = %this.Velocity;	
 	 		%this.Velocity = 20, 20;
 	 	}
 	
 }

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.


#1
10/27/2009 (2:01 pm)
Would I be getting further away or closer? Thanks.



function sceneWindow2D::onLevelLoaded(%this, %scenegraph)
 {
 	%this.setUseObjectMouseEvents(true);
 }
 
 
 function Cube::onLevelLoaded(%this, %scenegraph)
 {	 
 	 %this.setUseMouseEvents(true);
 }
  
 function sceneWindow2D::onMouseUp(%this, %modifier, %worldPosition, %clicks)
 {
 	%this.setPositionTarget(%targetX, %targetY, true, true, true, "0.1"); 	
 }
 
 function Cube::moveTo(%targetX, %targetY, %speed, true, true, true, "0.1")
 {	 	 
 	 	%speed = 30; 	
 }
#2
10/28/2009 (6:02 am)
First, the title of this post says nothing at all about what is inside the post.

Second, none of this code will compile.

Third, there is a disturbing lack of comprehension demonstrated here.

Since I've spent a lot of time with you, I feel like you need to carefully read the following.

We've discussed the problems that come from poorly labeled titles, but let me stress it again. I spend several hours a week searching the forums for help. When I have to click on every poorly labeled title to determine if it has the answer I need, I get frustrated.

You stated, and I quote, "I am having some trouble getting this code to fly". Obviously you couldn't have tried to test it because none of it would work.

Finally, there are several examples in this code that show very little has been learned in the last 4 1/2 months. There are some things have been described to you in the last 48 hours that have been completely ignored when you wrote this code.

I am deathly serious when I say that I can find an error on almost every line. In addition, all of these errors have been pointed out to you by friendly forum folks in other forum posts you created.

By certain actions on my part, I've proved that you are looking for somebody to write your game for you. I think it's unhealthy for any human to not have that spark that makes you want to learn.

I just finished my latest cellphone project, and I'm starting my next casual game in a few hours. Because I'm going to be very busy with that, I won't have but a few moments here and there to help on the forums. And, unfortunately, it'll be going to people who will be able to create a game with my help. I can't handle following 107 follow-up posts when no lessons are learned.

Nothing above is opinion, said with frustration, or meant in anger. All of it is fact that I could easily back up with extensive documentation. But because you'll post an angry reply to this and I won't have time for a rebuttal, let me just say these final words:

Nothing will prove me more wrong than if you deliver a game.