(SOLVED)Im trying to tween the size of a pic like its a button

Sup guys! Im still working on my racing game, its called Racing 4ever. And im trying to make the level scene, and adding tweens, i know theres many other ways to do this other then adding a pic, like a outline of the road, or just a button but i like it this way.
the problem is the pic goes too big then too small no matter what i tried.
Here is my game. Racing 4ever 🏎️ | Play on gd.games
Here is the screenshots of events. go on my game and click levels.

(btw what do u think of my logo? u can c it when u open the link!)

Firstly, there’s not much difference between 0.2 and 0.3. Is this because you’ve already changed the size of the object in the scene editor? The tween scale will work on the original size which means you then have to put weird numbers into the tween?

Secondly, classic tween booboo, each tween needs to have its own name.

Thirdly, it’s best to have some kind of limit on the condition. You’ve got trigger once in the first event which is good. If a trigger once isn’t suitable for the second event, then you can think of some other way, like cursor isn’t on sprite, change Boolean to false. If Boolean is false, do this tween

Fourthly, the wise people here say that if you don’t want tween weirdness then use a remove tween action and a tween has finished condition. It’s probably not always necessary but if you want to reduce the chance of errors, it’s good to go to that effort even though it’s extra work.

I haven’t played your game yet, and I still want to play your other game too. But I had a quick peek. That logo is AMAZING, I love it.

2 Likes

when i do 0.2 nothing happens it shrinks for 1 secound, then ntohing happens on the button or not.

of srry forgot about that. :sweat_smile:

It needs it? coz the condition is inverted.

Umm remove the tween action?

Thank you @Bubble !

I played the game! - good work there sir! - i couldn’t beat the AI!
so …give the tweens different names eg ‘scaleup’ and ‘scaledown’ and use trigger once on each and you could add the condition ‘scaleup’ has finished to the ‘scaledown’ event.

1 Like

Thank you Sir. :saluting_face:

Yea thats actually a problem, for some reason when i preview on the gdevelop app its faster, but on gd.games its slower.

Yup done that, @Bubble told me!

oh? ok i will try.

idk what this is, but il go c.

1 Like

Hi @zGameCreator!

Well done!

Your logo, what logo? :blush:

More seriously, it is fantastic and the effect applied on it, is well.

A+
Xierra

1 Like

2 Likes

I understood, of course.

A+
Xierra

1 Like

There are also several behaviors which make using images as buttons much easier. This includes button states and tweening.

2 Likes

Which one would u recommand me using in this situation?

The last one automatically resizes the object with a tween. I believe it might automatically add the button states behavior which adds conditions like was clicked.

1 Like

Actually, in this case, it’s better to use the same tween name since you don’t want them to run at the same time.

2 Likes

Wait what. now im confused, if u put the same tween name wont it run at the same time?

It replaces the existing one. This is why, for instance, you can’t tween the color and the position at the same time by using the same name.

1 Like

So, i use the same tween name, i continue to use the normal tween behaviour?

I was only giving a precision to a previous answer.

Keith’s answer is what i think is best.

1 Like

:heart:

What type of object are you trying to add the behavior to?

1 Like

A panel sprite.

(from my files)