Animation on key press - no behaviour - only events

Get help using Construct 2

Post » Thu Dec 31, 2015 9:29 pm

Yes I understand that an animation cannot finish if its not playing, but I thought that nesting conditions make them run only when an IF statement in the above condtition to that of the nested is true, in this case - play idle02 is higher than on idle02 finished. This would be much more intuitive:

Every random (a,b) set animation to idle02
-------------->On animation idle02 finished.... <-------------- run this only when the IF on top is met, in this case when animation is set to idle02....

Now does that not makes sense?Well to me it does as this is a condition and a sub condition which should be ran only after the condition above is met... Since I am a character animator and an illustrator and not a programer (hence using visual programing) this makes much more sense to me...

Anyhow Im not too keen on running the timer as I dont want to use built in behaviours. Ill try to look around and try and solve this.
Thanks for your time and help.
Brick by brick, stone by stone.
B
56
S
25
G
18
Posts: 273
Reputation: 13,363

Post » Fri Jan 01, 2016 12:27 am

Solomon wrote:Yes I understand that an animation cannot finish if its not playing, but I thought that nesting conditions make them run only when an IF statement in the above condtition to that of the nested is true, in this case - play idle02 is higher than on idle02 finished. This would be much more intuitive:

Every random (a,b) set animation to idle02
-------------->On animation idle02 finished.... <-------------- run this only when the IF on top is met, in this case when animation is set to idle02....

Now does that not makes sense?Well to me it does as this is a condition and a sub condition which should be ran only after the condition above is met... Since I am a character animator and an illustrator and not a programer (hence using visual programing) this makes much more sense to me...

Anyhow Im not too keen on running the timer as I dont want to use built in behaviours. Ill try to look around and try and solve this.
Thanks for your time and help.


Yes, what you say makes sense, that's why the subevent you created doesn't..

If the event above is true, there is no animation playing..
When the actions attached to that event have run, the animation is playing, but at that time the event/conditions aren't true anymore..
So the subevent will only run if the above event is true..

A sprite can't be playing an animation and not be playing an animation at the same time..
You reference a sprite in the top-event that isn't playing an animation, so the sprite in the subevent must be not playing an animation as well..
This is how events work, that's why I added that link, for it is explained very clearly there..

I'm not sure why you would choose not to use built in behaviours, but if you don't want to, you could make a timer yourself by using the:

wallclocktime
The number of seconds since the game started, not taking in to account the time scale (i.e. the real-world time).

just set a variable to the wallclocktime and when the wallclocktime is higher that a certain amount, bladibla..
(But you would need another variable, ofcourse..)
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Previous

Return to How do I....?

Who is online

Users browsing this forum: evillair, Magistross, vankizzle and 7 guests