Game Development Community

just bought iTorque, will not stop crashing

by Nathan Meier · in iTorque 2D · 07/15/2013 (1:35 pm) · 2 replies

I just bought iTorque a week ago. I used it some more today, trying to make a joystick for my game.
But every time I build and run the project it crashes. I restart the program back up, but the code doesn't work because nothing happens. Here is the code I've been trying to get to work.

function DPad::Update(%this, %worldPos)  
{
%this.ThumbDisk.setPosition(%worldPos);
}

function DPad::onTouchDown(%this, %touchId, %worldPos)  
{
if (!%this.getIsPointInObject(%worldPos))  
        return;
  
    %this.thumbpos = %worldPos;  
    %this.setPosition(%this.thumbpos);  
    %this.tid = %touchId;  
  
    %this.Update(%worldPos);  
}  
  
function DPad::onLevelLoaded(%this)  
{
%this.thumbDisk = ThumbDisk;
    %this.thumbdisk.setPosition(%this.getPosition());  
%this.setCollisionDetect(CIRCLE);
%this.setCollisionCircleSuperscribed(true);
}  
  
function DPad::onTouchDragged(%this, %touchId, %worldPos)  
{  
    if (%touchId != %this.tid) return;  
      
    %this.Update(%worldPos);  
}  
  
function DPad::onTouchUp(%this)  
{  
    if (%touchId != %this.tid) return;  
  
    %this.thumbpos = %worldPos;  
    %this.thumbdisk.setPosition(%this.getPosition());  
      
    %this.tid = 0;  
    %this.targetObject.setAtRest();  
}    




As far as I can tell, the syntax is good. but no matter what I do, it keeps crashing and not working.

Does anybody else have to deal with iTorque crashing like this? I even re-downloaded it and
its still is doing the same thing. Please help.

#1
07/15/2013 (1:42 pm)
Also, I have no idea on  keeps popping up in this post. its not part of the code.
#2
07/16/2013 (6:40 am)
What application are you writing your scripts in?