Animation wont run on event

Discussion and feedback on Construct 2

Post » Sun Sep 04, 2011 12:43 am

Hi and another (maybe stupid question ^^),

ive created an emitter effect Animation with ParticleIllusion (output as png, 140 frames) and insert it as sprite animation into C2 (named the sprite as "buttonEffect" and the anim named as "effectAnim").

now ive create a event on a button (Button named as B1)
and create the following Actions:

If Cursor over B1 then:

- buttonEffect: Set animation to "effectAnim" (play from beginning)


if i mouse over the button now... the animation wont play (zOrder for the animation is top)

so ive tried to insert another Action:

- buttonEffect: Start animation from the beginning

and same here... no working animation.

Anything what ive forgot? Any Ideas?

LuziLuzius2011-09-04 00:44:04
B
5
G
2
Posts: 14
Reputation: 1,229

Post » Sun Sep 04, 2011 12:48 am

It should work - did example of that but only with 12 frames sprite.

btw i think 140 frames for a sprite animation is abit to many:)
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sun Sep 04, 2011 12:51 am

hmm is ther a limit for the framecount? i mean.. the complete anim has less than 80kb (all frames counted)..

[EDITH says:]

Okay.. now ive cropped the Anim to 14 frames..
The first frame is still visible.. and if i release the Event.. the anim still not play.. -.-

Additional Info:

at the event .. theres another anim inside.. they will play without problems.. so the event triggers two Animations.. but only one plays..


[/EDITH]Luzius2011-09-04 00:59:31
B
5
G
2
Posts: 14
Reputation: 1,229

Post » Sun Sep 04, 2011 1:02 am

hard to say, could you post your project file? be easier to help
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sun Sep 04, 2011 1:09 am

Sorry but i cant publish the Project atm..
but i can publish some screens...

Event Screen:



EditorScreen:



Sprite Screen:

Luzius2011-09-04 01:10:07
B
5
G
2
Posts: 14
Reputation: 1,229

Post » Sun Sep 04, 2011 1:37 am

Okay.. ive created a Workaround... Still dirty but it works for the moment..

Ive created another Animation inside the Sprite named effectNone with an empty Frame..

At layoutstart the sprite will use the "effectNone" Animation.
On trigger the "Mouse Over", the Event switch the Sprite Animation to effectAnim with the 140 frames..
and on event "mouse out" the Sprite Anim sets back to "effectNone".

(But i hope to change this later to the right way if it works sometimes ;) )Luzius2011-09-04 01:38:07
B
5
G
2
Posts: 14
Reputation: 1,229

Post » Sun Sep 04, 2011 1:39 am

Instead of "Start animation from beginning" did you try "Set animation to "effectAnim" (play from beginning)" on effect sprite.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sun Sep 04, 2011 1:44 am

Yeah, I'm always using "Set animation to "animation name" (play from beginning)" for sprites with only one animation and as far as I remember "Start animation from beginning" works only after you have stoped animation in events - but can be wrong.shinkan2011-09-04 01:44:56
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sun Sep 04, 2011 1:45 am

yepp.. that works only for me if ive 2 animations inside the sprite..
with one animation it wont work.

(see my last post here in this thread)
B
5
G
2
Posts: 14
Reputation: 1,229

Post » Sun Sep 04, 2011 1:48 am

lol .. double post action :D

ive stopped all effect animations in the Event "System -> On start of layout" (not shown on the screenshots).. but it does not worked too..

[EDITH says:]

ive tried it again.. Stopped Anim at the "on start of layout" event..

and start the animation inside the "mouse over" event..
(Start Animation from the beginning... and the 2nd test "Set animation to "effectAnim" (start from the beginning)

now the animation starts if i leave the event trigger area (so the mouse over evnt isnt triggered anymore)
and if i trigger the "mouse over" again.. the anim stops ..
weired.. -.-Luzius2011-09-04 01:52:22
B
5
G
2
Posts: 14
Reputation: 1,229

Next

Return to Construct 2 General

Who is online

Users browsing this forum: shinichild and 11 guests