Game Development Community

How to create two cursors in TGB

by mohanmartin · in Torque Game Builder · 03/14/2008 (5:14 am) · 2 replies

How to create two mouse icons? im doing a puzzle game, in this find differences between two images in a same screen. when i click an area of difference for left side image the cursor also move the same position of the right side image. any one help?

#1
03/14/2008 (6:09 am)
You could create a bitmap image of a mouse cursor and move it in relation to the current mouse cursor position. That would give the illusion of 2 mouse cursors. Just a quick idea off the top of my head.
#2
03/14/2008 (8:56 pm)
Ok thakns. i add below lines into function startGame(%level)
Canvas.hideCursor();

add below lines into function endGame()
Canvas.showCursor();

create new cs file as below

function SceneWindow2D::onMouseMove(%this, %mod, %worldPosition)
{
hand.setPosition(%worldPosition);
}

its working