Shield Anaimation Help

For questions about using Classic.

Post » Mon Feb 22, 2010 1:11 pm

Hold a Mouse button to move.

I got my shield to flash when it bumps a wall but want it to flash longer more like an electrical BUZZ!

I doubled the animation objects 2,3,4 are the same as 4,5,6 which may not be necessary, but it was an attempt in making the animation run longer.

Can anyone help me lengthen the shield flash when the ship bumps a wall?

Capfile made with v99.83
http://www.box.net/shared/oos0850r32
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Mon Feb 22, 2010 5:14 pm

I think I found what might be the direct problem - the condition is only present on collision. Set it to run a few ticks after as well, perhaps?
B
2
G
2
Posts: 13
Reputation: 676

Post » Mon Feb 22, 2010 5:45 pm

[quote="Anaxim":2nxo9jcz]I think I found what might be the direct problem - the condition is only present on collision. Set it to run a few ticks after as well, perhaps?[/quote:2nxo9jcz]

Any suggestions on how to do that?
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Mon Feb 22, 2010 5:55 pm

You have plenty of frames of animation for that shield effect - you might just make it a separate animation call it "impact" or something and then set your collision event to start that animation. Then add another event for Animation over and set it back to the normal one. Hopefully that made some sense :)
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Mon Feb 22, 2010 6:01 pm

Somebody has a point. A good point.
Separate the frames of the shield into another animation and set it to run on collision. Then check if the animation is running and then to end once before setting it back.
Should work.

EDIT: I checked it out.
I found the general error, which was kinda stupid - you have Always Condition with Action Set Frame to 1. It doesn't let the animation run as it was. Try start of layout, rather than always.
B
2
G
2
Posts: 13
Reputation: 676

Post » Mon Feb 22, 2010 7:02 pm

[quote="Somebody":3r4lkr73]You have plenty of frames of animation for that shield effect - you might just make it a separate animation call it "impact" or something and then set your collision event to start that animation. Then add another event for Animation over and set it back to the normal one. Hopefully that made some sense :)[/quote:3r4lkr73]

The separate animation did it. But instead of making another event to stop it I simply added a blank animation at the end. Works great now
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Mon Feb 22, 2010 7:18 pm

Good to know. Will we be seeing the project posted later?
B
2
G
2
Posts: 13
Reputation: 676

Post » Mon Feb 22, 2010 7:33 pm

[quote="Anaxim":142kaohz]Good to know. Will we be seeing the project posted later?[/quote:142kaohz]

Sure Anaxim, but noting special. The actual shield anim is junk just to test but good enough to let me know make the real effect.

Hope this cap helps you.
http://www.box.net/shared/ds2j6akrtm

Note for the actual game I added rotation to the shield because it fit the ship's contour
B
28
S
8
G
8
Posts: 530
Reputation: 7,154


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests