Game Development Community

OnMouseDown(...) question

by Harrison Brock · in Torque Game Builder · 08/08/2008 (9:32 pm) · 2 replies

I have this code here:

function sceneWindow2D::onMouseDown(%this, %modifier, %worldPosition,%clicks)
{
    if(isObject(%this.ho))
        %this.ho.delete();
}

This will delete the object with an HO class on a Mac, but this will not work on windows. Why is this?

#1
08/09/2008 (12:30 am)
I don't see any typos there, I suspect your problem is elsewhere, like %this.ho is not getting assigned?
#2
08/09/2008 (2:50 pm)
function sceneWindow2D::onMouseDown(%this, %modifier, %worldPosition)
{
    if(isObject(%this.ho))
        %this.ho.delete();
}
try deleting %clicks