Rotating and decreasing speed in a specified time

hello guys

so i want to make an object rotating , but i want to decrease speed in a specified time
for example rotate object 320 degree / in 1 second , then after 5 second decrease speed (degree) and finally stop
its will be done with time scale , but object frame rate will be so low
i want something smoother

would you help please?

1 Like

Hello In my opinion you shouldn’t use time scale, instead you can use object timer. And also you can use tween for rotation. To make decrease in speed I use object variable. If I understood you right you want to spin the object in 320 degree per second and want to decrease its speed in 5 second to stop it. You can use variable to achieve that easily.

1 Like

thank you so much
unfortunately i could not find tween part of code , will you please show me tween setup?

1 Like

Of course sorry for the late reply. You just add tween as behaviour to your object :slight_smile:

Definitely should check tutorials first, those helped me a lot :slight_smile:

1 Like

thank you so much for your kindness , i make tween behavior for my object , my mean is tween action setup , if its possible please open this specified part and send me an screen shot
thank you so much its solve a lot of my problems

1 Like

Of course I wanted to share the example but I don’t know why I can’t share zip here. So I will tell you that action is “variable tween”. You choose your object in the action section and then choose tween variable I put a screenshot down below. Still you can ask whatever you want :slight_smile:

1 Like

thank you so much dear @kingwulfgar

i dont have this option , should i do anything else?

and this is tween setup in newsprite2 behavior

my gdevelop is latest version
what should i do to have this option?

Some actions have been renamed recently, but the actions remain the same.

@kingwulfgar you can upload zip files on easyupload.io or similar, and share the link here.

2 Likes

Hello dear @Gruk
so what is this option new name?

because when i check tween in object variables , its only have “Tween a number in an object variable” option , and its not contain “from” option
i search other tween option in object action , i didn’t find any tween with “from” option :frowning:

Thanks @Gruk You need to use that option, just the name is different function is the same, that is all :slight_smile: @H3KTOR

1 Like

Your screenshot says “from its current value”. Change the value before, if needed, I guess.

2 Likes

Yes, it will already change the current value of the object variable like you said Gruk

1 Like

Would you check it please? its not rotating :((

1 Like

thanks to all of your guys to help , with some edit i solve it , thank to you for paying attention to my question

here is how its solved

2 Likes