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.
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.
About the author
Torque Owner Nathan Meier
Default Studio Name