Tile Maps
by George Ison · in Torque Game Builder · 01/03/2012 (9:42 pm) · 4 replies
Hey all,
Simple question, is there some kind of trickery I'm missing in order to get mouse events from a tile map? I am working on a match 3 engine and was trying to see what could be utilized from the T2D tile map system, but I cannot seem to get the class mouse events to register.
Is there something I should know here?? :-)
Thanks for the help!
Simple question, is there some kind of trickery I'm missing in order to get mouse events from a tile map? I am working on a match 3 engine and was trying to see what could be utilized from the T2D tile map system, but I cannot seem to get the class mouse events to register.
Is there something I should know here?? :-)
Thanks for the help!
About the author
Love to engineer and develop just about anything. Our primary focus though is that of computer games and software tools.
#2
Yes absolutely, on the scenewindow as well as the tile map object. Just like we have done in our many other projects. I tried setting up the use of all of the mouse events, such as onMouseDown and onMouseUp and could not get response from any of them. Our tile map object has a class set to GameBoard. So when applying the call backs GameBoard::onMouseDown(%this, %modifier, %worldPosition, %clicks) has absolutely no response.
Is there another method for getting mouse interaction from the tilemap?
Thanks for your help.
01/04/2012 (8:12 am)
Michael,Yes absolutely, on the scenewindow as well as the tile map object. Just like we have done in our many other projects. I tried setting up the use of all of the mouse events, such as onMouseDown and onMouseUp and could not get response from any of them. Our tile map object has a class set to GameBoard. So when applying the call backs GameBoard::onMouseDown(%this, %modifier, %worldPosition, %clicks) has absolutely no response.
Is there another method for getting mouse interaction from the tilemap?
Thanks for your help.
#3
Hugo.
01/06/2012 (7:53 am)
useMouseEvents should work, probably another object on the screen is intercepting the mouse calls, maybe a GUI Element, I suggest you to check if this is happening in your scene.Hugo.
#4
Yea I initially thought of this as well. I could not seem to find what it was if this were the problem, just skimming through it. I have been working on something else at the moment and haven't got to go back and tackle this issue, but this will be on the top of my list of things to check.
01/06/2012 (12:01 pm)
@Hugo,Yea I initially thought of this as well. I could not seem to find what it was if this were the problem, just skimming through it. I have been working on something else at the moment and haven't got to go back and tackle this issue, but this will be on the top of my list of things to check.
Employee Michael Perry
GarageGames