Starting and need direction.
by Cory Herlihy · in Torque Game Builder · 10/24/2007 (2:39 pm) · 4 replies
I have jumped in with both feet following the tutorials and attempting to learn the scripting behind the scene. Just like others, I have decided to write and asteroids clone for learning purposes.
The problem I am having is I added my 'ship' that I want to use, and want to use the functions from:
http://tdn.garagegames.com/wiki/TGB/Behaviors/Asteroids
However, I tried setting the CLASS under scripting to AsteroidsControlsBehavior which is in the asteroidsControls.cs file (from the url above), and in my game.cs file I added:
exec("./asteroidsControls.cs");
after
function startGame(%level)
{
But hence, my ship does not move to Up and Down keystrokes. What am I doing wrong? Have I not referenced the controls correctly?
Thanks for any help.
The problem I am having is I added my 'ship' that I want to use, and want to use the functions from:
http://tdn.garagegames.com/wiki/TGB/Behaviors/Asteroids
However, I tried setting the CLASS under scripting to AsteroidsControlsBehavior which is in the asteroidsControls.cs file (from the url above), and in my game.cs file I added:
exec("./asteroidsControls.cs");
after
function startGame(%level)
{
But hence, my ship does not move to Up and Down keystrokes. What am I doing wrong? Have I not referenced the controls correctly?
Thanks for any help.
#2
10/26/2007 (5:01 pm)
Classes and behaviors are two things. You also don't need to exec the steroid control. Since it's a behavior just drop it in your behavior folder and then you should be able to add it as a behavior to your object and not a class.
#3
10/26/2007 (5:04 pm)
In fact you can just drag the zip you download from the site into your TGB window and it will unzip and place the script file in your behaviors folder and load it properly.
#4
10/26/2007 (6:58 pm)
Wow that crazy! Nice.
Torque Owner Pesto126