Flash a sprite.

Get help using Construct 2

Post » Thu Jan 26, 2012 1:35 am

Hi

I have a mpving sprite. When it moves over (collides with) another sprite i want to change its appearence for a short period; just a quick flash.

So far i have spawned another sprite (the one i want to flash)on top of the orriginal and if i use the flash behaviour it does do what I want but not fast enough. I've set the wait time to 0.1 and its still too slow.





B
3
G
1
Posts: 6
Reputation: 512

Post » Thu Jan 26, 2012 4:34 am

I don't know if it helps, but here is a set of tests I was doing for almost the exact same thing.

ButterflyBlastTest.capx[

What you describe doing is like the "wait" option.

The blast and longblast animations are just different number of frames and frame speeds.

The fade assigns the spawned object a fade behavior, so it the blast is much more subtle. I'm sort of leaning towards that one, but may try fading an animation. (sort of a combination of blast animation and fade.)    
B
29
S
11
G
12
Posts: 281
Reputation: 11,878

Post » Thu Jan 26, 2012 4:46 am

[QUOTE=eamonn]I've set the wait time to 0.1 and its still too slow.[/QUOTE]

You can make it quicker, like 0.05.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Thu Jan 26, 2012 10:38 pm

Hi

@Tokinsom I tried )0.05 and 0.005 but still too slow I don't think there is a difference in the two so I recon i've reached its limit with the FADE.

@kittiewan I have to download a newer version of C2 to play your file.
I'll let you know if it solves my problem.

Thanks Guys
B
3
G
1
Posts: 6
Reputation: 512

Post » Fri Jan 27, 2012 7:53 am

@everybody : be careful with anything timed as less than 100 milliseconds (0.1 seconds). For example, on Windows (XP but still somewhat true on 7), it's impossible for the OS to ensure that something will happened in less than 100 milliseconds, everytime (apart from the refresh GUI loop for the graphic card). It's an "at best" procedure. So, when the OS can't certify that, with C/C++ code, I'm not sure you can enforce that on JS interpreted code, running in a webbrowser...
So remember that when setting timeouts for flashing.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 1 guest