@Birkemose, thanks for responding. However, what you describe is only how to set up the whole touch system, what I want to do was do "create" to areas that were touchable. I guess I could just try the position in ccTouchBegan, or is that possible?
Ex. Convert the touch position to screen coordinates -> check if the x-coordinate is <= 120 or >= 360 . (Screen width divided in 4, 120 is the first part of the screen., 360 and forward is the last.)
EDIT: Tried it out and it kinda worked. When I increase/decrease the x-coordinate by 5 is actually works, but it does not look to smooth. I tried to make it more smooth by adding a ccTime-parameter but when I press anywhere on the screen know I get the following error message: "Thread 1: Program received signal: SIGABRT".
This is my method:
-(BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event:(ccTime)time{
CGPoint touchPostion;
touchPostion = [ touch locationInView: [ touch view ] ];
touchPostion = [ [ CCDirector sharedDirector ] convertToGL:touchPostion ];
if(touchPostion.x <= 120){
character.position = ccp(character.position.x - 5*time, character.position.y);
}else if(touchPostion.x >= 360){
character.position = ccp(character.position.x + 5*time, character.position.y);
}
return YES;
}