Trouble with "Animation Finished" Event

For questions about using Classic.

Post » Tue Feb 21, 2012 7:53 am

At the end of my level, in my platformer, I was hoping the player could approach an elevator, and hit the spacebar, prompting an animation that would show the elevator opening, the character getting in, then the elevator closing to finish things up.

But I've had major problems trying to make this work. It all goes well up until the end of the animation where the elevator has opened. From there, it just ignores the part about closing and where the character is supposed to look like he has gone in. It just goes straight back to the "Idle" animation I had set up where the doors are closed.

I figured the problem had to be my "Animation Finished" event, which sets it up so that once the "Elevator open" animation finishes playing, it'll go to a completely different group and specify events for closing the elevator door and having the effect of the character going inside of it.

Now as I said, this part of what I was hoping to do always gets ignored for some reason. But I know it's not the group which isn't working, because within that group I still specified the closing out of the level, which still works. It's just that certain parts, the closing and the character hopping in are completely omitted somehow.

I'm at a stage in my project where I'd rather not post a .cap of this, but I will post a screen cap... hope that helps.



Note: The 6th event has nothing to do with my issue, it's just inconveniently placed.

A couple of other things I should bring up:

- I unchecked loop in the animations for the elevator on all of them.
- I have an "Idle" animation for the elevator since without any behaviors for it, I couldn't think of any other way to keep it looking like a closed elevator until the other events came up. I'm still not sure if that's an issue or not.    Jim152012-02-21 07:56:00
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Tue Feb 21, 2012 6:18 pm

Add a "play current animation" action to event 9, that will play the animation from the beginning.

The "Set Animation" action leaves the animation frame number unchanged, so when changing to "Close" the animation is already done and "Animation finished" was not triggered.
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Wed Feb 22, 2012 4:38 am

Thanks for the response R0J0hound.

When I add "Play current animation", the elevator plays the open animation, but now instead of skipping an animation it just stops there and seems to ignore the other events.
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Fri Feb 24, 2012 12:59 am

I can post the cap if anyone thinks that'll help. Like I said, I'm at a stage where I'd prefer not to in my game, but I'm dying to get this fixed and nothing seems to work. :/
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Fri Feb 24, 2012 1:47 am

Post it, that'll help. You might be running into a little known oddity of how triggers work.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Fri Feb 24, 2012 2:58 am

http://dl.dropbox.com/u/42313097/Boss%20Man%20V77.cap

The problem I'm having is in the event sheet for the first level.
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Fri Feb 24, 2012 3:15 am

Add a 'trigger once' after the elevator 'animate' condition in event 9. Does that make it do what you want to?
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Fri Feb 24, 2012 3:39 am

That worked! Took you minutes to figure out a problem I couldn't solve in hours.

Thanks for the help!
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Fri Feb 24, 2012 3:44 am

Well, I have been using construct for like 5 years. :) Keep at it and you'll get better at it too!Arima2012-02-24 03:44:37
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest