How could I make it so my program returns the GID of the tile I just touched on? I loaded my level1 tiled map through it's enum tag thing. Then I tired in despair something like this:
- (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint point = [touch locationInView:[touch view]];
point = [[CCDirector sharedDirector] convertToGL:point];
CCNode *level1temp = [self getChildByTag:kTagLevel1];
[level1temp setTileGID:1 at:ccp(touch.x,touch.y)];
}
Thanks for your help.