Question that can't fit in the title

0 favourites
  • 9 posts
  • What can the problem be if you can't make animations or values start timers? Whit animations i do make it so that the timer only starts at the animations first frame and whit values i only make it so that the vales immediatly switches to something else after it has started the timer. Still the effect of the timers never happen. So what can the problem be?

  • If you can't answer the question whitout looking at a copy of my capx, say that now.

  • You, indeed, need to post a copy of your capx, as it is always that best thing to do when asking for help.

    Most of the time, the problems are specific to the project itself and how it is set up.

    Also are you aware that there is, in the Sprite object, a "On animation end" condition that would trigger once the (non looping) animation is ended ?

    It could be better than using a timer ?

  • I tested the On Animation ended solution but it has problems. The sprite is supposed to be affected multiple times. So after it has been affected by a another sprites on animation ended event, it still needs it to happen again multiple times. So i added the action, go to frame 0 to the On animation ended event so that the animation would run again and reach the ending frame. The problem is that if you have Loop set to no, the animation goes to frame 0 but don't go on past that. If you set Loop to no it goes past frame 0 but the effect the on animation ended is supposed to create doesn't happen instead. That could be becuase the On animation ended event doesn't work whit looping animations but like i said making it not loop doesn't work either. Thanks for the suggestion anyways. It maybe could work, if you could give a solution to these problems.

    But in case there is no solution to the problems whit that suggestion, here is a copy of my capx. The capx takes up alot of memory, so now you know that and don't need to comment on that. I have changed the appearance of some sprites for private purposes. When you open the capx you will start on layout 50 where the Sprite 1258, the spriet whit problems is located. The latest event in Event Sheet 4 is the ones that is connected to Sprite 1258. Please don't look deeper into the project then necissary and don't comment on anything that isn't neccissary.

    https://www.dropbox.com/s/4ks20oboupgz8 ... .capx?dl=0

  • If you wonder what the sprite is supposed to do is that it should change movement direction. In the currents state its starts whit moving one direction but never changes direction even though it's supposed to.

  • Your game is too monstrous to investigate. I suggest making a smaller example the shows the same problem, so people can have a look.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It doesn't matter that my capx takes up alot of memory and is massive. When you start the project you immediatly start at the layout where the problem is so you don't need to worry about all the other layouts and most things basically. The problematic events is also the latest events in Event Sheet 4 so no need to look for them. I have done all i can to make the capx take up as little memory as possible and if you know some way to make it take even less you are free to do it. But anyway if you still is hindered bu the high memoru usage here is a capx whit only thhe problem and nothing else. Evyrything is the same.

    https://www.dropbox.com/s/4yxcwylmk4w90 ... .capx?dl=0

  • 8 Billions of gigabytes necessary RAM. Nice...

    It just doesn't make sense getting this to work honestly, you should serioulsy revise your base design otherwise you won't be able to make your project work except on a specific dev machine.

    You don't want people to comment, but at the same time you are requiring help, so please, take that comment as another help feature.

    Now for your issue.

    To get back to "On animation ended", you can simply not make the animation loop and use the action "Animation - Start from beginning" to make it play again (be sure that the animation is not set to loop). That's how you manually handle a looping animation.

    I must admit otherwise that I have no idea what your issue actually is.

    What do you expect your project to do and what is effectively happening ?

    According to what I can gather from the code, this is working as programmed. So I don't get where you are having an issue.

  • You will never get a timer in sync with an animation. Useless to try.

    If you want something to happen on the end of an animation, then set the animation in 'no loop'.

    Use the 'on animation end' trigger to do wath you need at that time and restart the animation. Now the animation loops and you can use the triggers as timers.

    If u want to change in animations (by inst. directions changes) to happen after the previous animation ended, not during. Then record the need to change in a variable. Something like 'on key pressed' set variable to 'number of key pressed" Add to the trigger 'on animation end' an event that compares the variable. Reset the variable in an action, change animation.

    That are the two things that i can understand out of youre incomplete info. Did i understand it wrong, then write exact what you want the sprite to do when what is triggerd.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)