Change the width of the tiled sprite

I can’t change the width of a tiled sprite, I use Extension “repeat every X seconds” to change the width every few seconds, initially They work as they should. But when I add some events, they don’t work anymore, When I delete the events I think caused the error, they still don’t work. I don’t really know what happened. So please help (Is this a bug?)

If it worked, and then didn’t after you edited the events, then it won’t be a bug.

If you provide a screen shot of your code, then we can help .

Here is some code related to changing the width of the tiled sprite

In those screen shots, what parts don’t work the way you expected or wanted?

change width sub event with extension “repeat every X seconds”, They control other related events, so if he doesn’t work then the others too

But what are the signs it doesn’t work? The events say the width is increasing while it’s less than 96 pixels wide. Does it reach that width?

What have you set the repeat to be? Do you reset, pause or resume the timer anywhere?

Yes, it reach the specified width. No I don’t pause, resume or reset. The purpose of the extension is to increase the width of the health bar, Just that

If it reaches the specified width, then the following bit doesn’t work?

If so, it could be that the width isn’t exactly 96. It could be 96.0000001 (for example).

I’d recommend you check the width > 95 instead.

Also, you need to make sure all your other conditions are true too (and does that opacity check really need to be there?)

All right, I’ll give it a try. Let’s see if this works

I did what you told me to, but it’s flashing like a flash extension. like, it’s flashing. it works but only for a few milliseconds.
Should I remove that “change opacity”?

What’s flashing? The UIPowerups, or the PlayerCooldown?

Also try adding a 'Trigger once while true" instead of the condition “The opacity of UIPowerUps = 255

Both of them blinked. ok i will try

It only flashes if I trigger it

thanks for the advice you gave, i made a few changes and it worked!

1 Like