hi guy i already found a dimilar post for this but the code there didnt quite work.
baisicly i am making a 2d game and i need to offset sprites.

below is all the code i have for this sprite. obv thers more code but i think this is all youl need to spot how to do it.

Sprite ball;

ball.bitmap = LoadABitmap("ball.bmp");
	if (!ball.bitmap)
		return FALSE;

drawSprite(ball);
ball.x = 400;
ball.y = 300;

thanks GFP91

Recommended Answers

To offset sprite you can just add to its position, ball.x += 10; ball.y += 10; Other than that, I'm not sure what you want

Jump to Post

All 2 Replies

To offset sprite you can just add to its position, ball.x += 10; ball.y += 10; Other than that, I'm not sure what you want

To offset sprite you can just add to its position, ball.x += 10; ball.y += 10; Other than that, I'm not sure what you want

HA! i cant believe i didnt thtink of this...... been game proramming for years and a simple line of code evades me...

ps problem an now be put in SOLVED catigory.

thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.