Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Does dbRotateSprite() work just once?

Author
Message
Manfred
16
Years of Service
User Offline
Joined: 23rd Jun 2008
Location: Austria
Posted: 5th Nov 2008 23:44
Hello guys,

im trying to rotate a sprite, therefore I use the command dbRotateSprite().
The Sprite should rotate while a key is pressed, but it just rotates once when I hit the key.

When I'm holding down the LEFT or RIGHT key, I want the sprite to rotate, but it just turns once by the specified 2°.

What am I doing wrong? Or can't dbRotateSprite() be used to do what I want?

Thanks and best wishes.

Casting, the art of manipulation; further information every day in TV.
Wikaman1
16
Years of Service
User Offline
Joined: 17th Aug 2008
Location: Scotland
Posted: 6th Nov 2008 00:05
put it in a loop.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Nov 2008 00:12
That won't make any difference.

@Manfred,
The rotate sprite function rotates to a specific angle - ie, you specify 2 degrees, it rotates to 2 degrees. If you specify 2 degrees again, then you see no difference because it's already at 2 degrees.

Use a variable, increment that, and use it to set the angle:


Login to post a reply

Server time is: 2024-10-07 09:22:47
Your offset time is: 2024-10-07 09:22:47