switchxs's Forum Posts

  • Thanks fro the reply Mystazsea.

    I had a go with the family but still had the same issue. The basic problem is triggering a new event when an animation finishes playing. At the moment I can't put the 'on animation finished' command in any loops.

    Are there other ways to do something after a certain animation has finished?

    Thanks

    Simon

  • Hi

    I'm having a little trouble getting something to work and a bit confused as to why it won't work.

    The basic logic I want to occur is when you hit the enemy first time it plays it's hit animation. If it get's hit a second time it plays it's death animation and the objects are destroyed.

    What I originally tried was to include the 'on animation finished' command in the for each loop but this gave an error during testing (error at bottom). So I moved the 'on animation finished' commands outside of the for each loop but this now means it affects all the enemies and not just the unique UID enemy.

    Screenshot of the enemy code below. Any ideas what I am doing wrong, what should I use instead of the 'on animation finished' command (I need to wait for the animation to finish otherwise the other condition becomes true and it dies straight away)

    Thanks

    Simon

    <img src="https://dl.dropbox.com/u/3796932/enemy_loop.jpg" border="0" />

    <img src="https://dl.dropbox.com/u/3796932/enemy_loop_error.jpg" border="0" />

  • Great, thanks a lot Keepee, that got it working as expected :)

    Simon

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi

    I'm continuing work on my platform game, taking snippets from various tutorials and examples but have a little bug with my patrolling enemies.

    They move from left to right correctly, I added a for each loop so I can kill each one and the others still move but when one sprite is mirrored they are all mirrored.

    I tried adding a for each on the actual sprite but that didn't work. I'm thinking I need to use UIDs but not sure where to start with them.

    My snippet of code looks like this so far:

    Any help is appreciated.

    Simoon

    <img src="https://dl.dropbox.com/u/3796932/enemy_patrol_bug.jpg" border="0" />

  • Thanks Vandinz, that is what I was looking for. I will try and hook the soft movement back into it. I just needed a prod in the right direction.

    Simon :)

  • Hello

    I'm new here, just started using Construct and working on my first game!

    I�m wanting to make a platform that bobs/sinks down slightly (say 50 pixels) when the player jumps on it, then reverts to its original position when you jump off.

    I thought this would be easy but I keep hitting a few blockers. I tried using the Lerp and Clamp commands to make it move down slowly which did work but I had the issue of my player always colliding with it so it continued down off the screen. (How do I say do this command only once when you collide with the platform?)

    As for getting it to revert to its original position I couldn�t get that working at all and wasn�t sure where to start. I thought I�d create an �else� command on the collision detection that makes it move back but I wasn�t able to find a way to add it to my event sheet (it was greyed out).

    I�m at work at the moment so don�t have a Capx but would appreciate some advice or pointing to a tutorial that I may have missed.

    I later installed the Ease Tween plugin and that gave me a nice elastic motion, but it either kept moving down or looping from the original position (again, same issue of only wanting to play the motion once and then revert when you're not in contact anymore)

    Here's a little diagram to illustrate what I'm trying to do :)

    <img src="https://dl.dropbox.com/u/3796932/platform_logic.jpg" border="0" />

    Thanks

    Simon