1
Help, Errors, FAQ / Best way to handle multiple "collectbles"
« on: 2013-03-15, 10:58:44 AM »
So I'm going to have multiple collectables. Some will do various things other than add points. So I want to group them by type. I thought I would keep all the point based collectables in one Tile Category but I can't seem to get a proper nested if statement to work
The logic is obviously
If TouchTile == TileCategory I want
if TileCategory.Index == X //Not sure how to get this part to work? I'm trying to use tilecategory touched but that doesn't seem to work
Play sound
Update Score
Remove tile X
If TileCategory.Index == Y
play sound
update Score
remove tile
That's my desired approach. My working approach is to create a different Tile Category for each collectable. This doesn't seem to be efficient.
The logic is obviously
If TouchTile == TileCategory I want
if TileCategory.Index == X //Not sure how to get this part to work? I'm trying to use tilecategory touched but that doesn't seem to work
Play sound
Update Score
Remove tile X
If TileCategory.Index == Y
play sound
update Score
remove tile
That's my desired approach. My working approach is to create a different Tile Category for each collectable. This doesn't seem to be efficient.