1
Stencyl Jam 17 / Re: Stencyl Jam 17 Winners
« on: December 23, 2016, 03:56:08 pm »
Congrats to the winners!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Repeatedly changing an actor's animation to the same animation will reset it to the first frame.
I worked around this by creating a block to change the animation that accepts the animation name as an argument, and checks whether the actor's current animation is different from the requested animation. If they're different, it sets the animation to the requested animation, otherwise it leaves it alone.
I used that block instead of the "switch animation" block.
Otherwise, you'll need to manage your actor's state more carefully and switch animations only on state transitions.
Unforunately, that's my case.Repeatedly changing an actor's animation to the same animation will reset it to the first frame.
This is only true for animations that do not loop. A looping animation will ignore a command to switch if it is already playing that animation.
How about having a bullet actor, and a replacement bullet actor. When the bullet actor hits the wall, immediately kill it and create the replacement actor in its place.
The replacement actor would look like the bullet actor, but it would have the physical attributes required for the character to jump on it; i.e, it would be a non-moveable object that the player character can collide with.
If you control your speed with an attribute (local if the character is just warping around, game attribute if between scenes too), you can add to that attribute, so the setting of the speed will be changed accordingly.
If you want to, search the games section of the Forge for "Demo-" and find my infinite climber; I think that one has the basic idea implemented (although it is automatic, not based on the character reaching a location).