From what I understand (which is very little) something like this should cause an object to fade in to 100 in 1 second:
Sprite.opacity + 100*dt
However, when I use it with a mouse click event, it only fades by 1. What am I doing wrong?
It has to loop through until sprite's opacity is zero. Make the mouseclick turn on some variable, and then have that variable be a condition for the sprite to lose its opacity.
Do you know of an example file or explain what you typed there for dummies? :)
Commented capx
Awesome, thank you very much! So if I'm understanding this correctly, it's the instance variable that is telling it to check every tick and this makes it fade in to full opacity or not?
Develop games in your browser. Powerful, performant & highly capable.
It is important to understand the difference between trigger events, and continuous events.
dt should only be used in continuous events.
I create this same thing, i mean destroy sprite and just spawn this same looking sprite but with fade option
I tried that but for some reason, I couldn't get the coordinates of the spawn correct. :P
Use only image point (to coordinate sprites) and it spawn correct