Tilemap Frame
by tODD k. · in Torque Game Builder · 06/13/2009 (6:23 pm) · 0 replies
After going through the tutorial in the help file I was left with some questions.
I created a tileset and filled the grid with the different frames of the tileset.
For this example, I wanted to create a wall that the player will collide with. On the frame with the wall image, I named the Tile Script: "wallClass", checked collision and saved the brush.
Now I want to reference that tile in my wallClass script on a collision, but not completely understanding the callback:
In my wall script how should I got about adding that to my onCollision?
I created a tileset and filled the grid with the different frames of the tileset.
For this example, I wanted to create a wall that the player will collide with. On the frame with the wall image, I named the Tile Script: "wallClass", checked collision and saved the brush.
Now I want to reference that tile in my wallClass script on a collision, but not completely understanding the callback:
t2dTileMap::onTileScript(%map, %layer, %tile, %script);
In my wall script how should I got about adding that to my onCollision?
function wallClass::onCollision(%this, %dstObject, %srcRef, %dstRef, %time, %normal, %contacts, %points)
{
}