Schedules ( i think )
by Bruno · in Torque Game Builder · 09/23/2005 (10:17 am) · 4 replies
Hi..,
So far i have used the schedule to pop up the enemys in the screen at certain intervals ( like in the spaceshooter demo) , but this method doesn't give much control on where the enemys will show up, in relation to the world, i may have a tile layer that represents a tower and enemys showing up on top of it.
I could disable the setWorldLimit for the objects, and position them where i want and just wait for the world scroll to be near them , but the clipping would then be disabled, and everything would slow down right ?
Is there a efficient way to do this ?
thanks,
Bruno
So far i have used the schedule to pop up the enemys in the screen at certain intervals ( like in the spaceshooter demo) , but this method doesn't give much control on where the enemys will show up, in relation to the world, i may have a tile layer that represents a tower and enemys showing up on top of it.
I could disable the setWorldLimit for the objects, and position them where i want and just wait for the world scroll to be near them , but the clipping would then be disabled, and everything would slow down right ?
Is there a efficient way to do this ?
thanks,
Bruno
About the author
#2
Thanks for the asnwer, i understand the way you are doing it, it seems it works quite nice, but just one question..,
How do you check if a tile is being rendered or not ?
09/25/2005 (2:22 pm)
Hi Philip,Thanks for the asnwer, i understand the way you are doing it, it seems it works quite nice, but just one question..,
How do you check if a tile is being rendered or not ?
#3
Basically, in the tile editor you can set up a value that will be passed to the fxTileMap2D::onTileScript callback when that tile gets rendered.
09/25/2005 (2:54 pm)
Check out fxTileLayer2D.setTileScript() and fxTileMap2D.onTileScript() in the reference and TileEditor pdfs.Basically, in the tile editor you can set up a value that will be passed to the fxTileMap2D::onTileScript callback when that tile gets rendered.
#4
09/26/2005 (4:25 pm)
Thanks Adam, i'l try it out :)
Torque Owner Philip Mansfield
Default Studio Name
I use this technique in my side scroller and it works quite well.
Here are a couple of pics. The first shows the marker tiles, and the second is with them replaced with blank images. The red and blue crosses are used to place the enemy ships in the world, and the green arrows are movement markers that define the starting and finishing positions of the enemies.