eliasfrost's Recent Forum Activity

  • Thank you Lordshiva, that was exactly what I was looking for.

  • Hi! Is there a way to pick instance by colliding with them, I'm trying to make a door mechanic and I want it that when I get into a specific zone I press a button and transition to another area. The problem is though that I don't know how to distinguish between instances, when I use the collide function it picks all instances of the object, and I don't want that.

    Can someone please explain how this can be done?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I thought up a little work-around.

    What I did was that I made it so that when you release the button, the game would wait for just under 1 sec, enough time for the accomodating animation to finish, and when it was done, you can move again. It's not super elegant but the animation don't stutter anymore when tapping, and it only becomes a hassle when you go crazy on the move button, I don't expect anyone to tap-move anyway so. Unless someone comes up with a more elegant solution, I'll keep this for now.

  • My character doesn't move on a grid so I don't have the luxury of waiting for animations to end.

    I also noticed another thing, in the script, the part that I've highlighted never gets to run, any idea why? Replacing the frame check with "isAnimationFinished" doesn't make a difference.

  • Hi! I'm making a cinematic platformer and I've stumbled a little problem:

    Since I'm making a cinematic platformer I wanted to make it so that when you stop, your character will gradually stop moving, to do this I made 2 extra animations: 1 for when you release the move key on the right foot, and one for when you release the move key on the left foot. What the game does is that it when you release the move key, it will check the frame of the current animation (walking or running) and then play one of the to accomodating animations, depending on which foot you land on. This is fine and dandy but here is where things get a little tricky:

    See, when you release the button and the game checks for the next right/left step frame, it will automatically play one of the accomodating animations, this leads to the nasty problem that you can't tap the move button to continue the normal walk/run animation without it continuously restarting one of the accomodating animations (because you also repeatidly release the button, see where I'm getting at?).

    I know it might sound really confusing so here is the project file so that you can see the scripts and animations for yourself, you can find the movement script in the 'controls' event:

    If someone knows a way to this problem, I'd be really greatful! Thanks!

  • So I digged a bit deeper into the manual and it seems that looped animations don't finish. That's why onAnimationFinish won't work. So, is there a way to toggle off loops for animations mid-game? Because I have an idea of how to get it to work if I can do that somehow.

    EDIT: So I found a way to make it work. I played around with the idea of additional animations like you mentioned and I found a solution:

    What I did was that I created 2 additional animations, one for when the player release the move keys when the character stands mid-walk on her right foot and one for when she stands mid-walk on her left. What I did then was I compared the current frame of the walk animation for when the key released (for example, if I release the move key on frame 4, which is the right foot) then I'd play one of the additional animations that start on corrisponding foot, and vice versa).

    So I finally got it work like I want it to. Problem solved.

  • Sure, attached the file.

    I got it to work somewhat but I still have one problem. Now, when you release the button slightly before the animation ends, the character will glide on the floor for the duration of the movement. Can I somehow do a check to see if he's still moving when the animation has ended to squeeze in another loop to smooth things out?

  • Hi! I just got started with Constructor 2 and I've run into a little problem.

    I have a character that I move with A and D. When I press one of those buttons my character will start moving along with an animation (named 'Walking'). This works fine, however:

    What I want to do is that when you release the move buttons, the character will finish it's move animation and then stop rather than stopping mid-animation. My problem though is that the character continues to move forever even though I've (I think) told it to stop moving after finishing it's animation. It's much easier to show what I mean by posting the event sheet, please see attachment.

    EDIT: Sorry, I meant the character continues to ANIMATE forever, not move. My mistake!

    EDIT SOLUTION: It seems that I got it to work, but not by using 'onFinish'.

    Here's what I did:

    At the keyboard A&D != check, I added 'isAnimationPlaying'

    And then I replaced 'onAnimationFinished' with 'compareFrame' to check if it's the last frame. If it is, then I stop the animation.

    Maybe I should've tried that before posting here, didn't think about it then though. Now we know at least!

    Help is greatly appreciated.

eliasfrost's avatar

eliasfrost

Early Adopter

Member since 5 Aug, 2014

None one is following eliasfrost yet!

Connect with eliasfrost

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies