Rable's Forum Posts

  • Thanks for the idea! But the capx doesn't seem to be downloadable with the link you provided. :-/

  • Thanks for the explanations. It all makes sense and we now know how to work around it efficiently.

  • Indeed, I'm afraid the wait 0 seconds is mandatory here. I tried your suggestion Ashley, and the problem is still there.

    From what I can see so far, the cleanest way to do this is this one:

  • mekonbekon

    Thanks a lot for your help. At least it's possible to make it look right.

    However, this is still a workaround in my opinion, and it requires checking the animation frame every tick, which isn't optimal. Is the behavior described above the way it is supposed to be? It looks like a bug to me. Maybe Ashley or another Construct guru can confirm if this is intended or not?

    I just tested the capx in C3 and the result is exactly the same in C3 than in C2.

  • Hi everyone,

    I just started to implement separated animations for my characters and their weapons, and I’m struggling to synchronize them with precision, even though they have the same number of frames and animation speed.

    Just run this code with the debugger, and when an attack is about to be finished, pause and advance step by step.

    You’ll notice that the weapon will get into idle animation one frame before the knight, even though the sword is dependent on the knight attack animation to be finished to launch its idle animation.

    If I move the action in event 4 to event 2, launching the 2 animations in the same event, the problem is STILL there!

    The only workaround I found for that is to put a wait 0 action at the beginning of event 4, but I’m guessing this is not the proper way to do that kind of things.

    Even weirder is that, even when I put the wait 0 action at the beginning of event 4, the idle animations are not synchronized. The sword is 1 tick earlier. And if I don’t put the wait 0 action at the beginning of event 4, then the sword animation is a huge 2 tick earlier than the knight!

    Am I missing something here?

    Is there a much more consistent way to do that kind of animation synchronization that I am not aware of?

    Thanks for your help!

  • Thanks once again for the reply .

    After thinking about the various solutions, I started implementing 250 new layouts into my game - one per level, with the different elements that were preloaded on each of them. It's quite some work but it's easier to do than I would have though. Good thing you have implemented a preload layout (by name) into the plug-in!

    Using this method and your preloader plug-in, I don't need any preloader screen and Healer's Quest has close to no load time at all, which is huge!

    Thanks a lot for making this wonderful mm_preloader plug-in!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for replying, everything is much clearer now!

    My next game will sure be thinked differently, but for Healer's Quest it's not possible to have all the object at start of layout. I have only one "game" layout and all backgrounds and enemies in the game are created on it. I'll see if it's still possible to do otherwise but it seems like a lot of work considering the "lag" time for what needs to be created is less than one second.

    I just have a last point on which I'd like to have more detailed explanations: what do you mean by "Otherwise you will probably have to preload both before and after the layout starts."?

    It's possible to preload something before the start of the layout? On the previous layout actually? I thought from your post that this was useless because it would get erased from memory, so I'm probably missing something here.

    Thanks for your help !

  • Hi ,

    I would like to ask you something, just to be sure I’m using your tool correctly.

    Here’s the context:

    Layout 1 has not the object BG1 on it.

    Layout 2 has not the object BG1 on it either, but BG1 is created in the event sheet, on start of layout.

    What’s the correct way to have BG1 preloaded so that I have a smooth transition from layout 1 to layout 2, and no stop at the start of layout 2?

    • Preload in layout 1? (then maybe BG1 is unloaded when going to layout 2 as it’s not present on that layout)
    • Preload at the start of layout 2? In this case does the plugin make a difference from simply creating the object on start of layout?

    Thanks for your help!

  • I'm also waiting for this one. Hope it'll find its way to C3 soon.

  • Also, will those jerky frames on the beginning of layout will ever be taken care off by the scirra? Only construct does that.

    I can't remember on which thread it was discussed, but to get rid of those frames you may try to put all the objects that will be created on this layout on it. Basically put them all on the layout (layout view), destroy them at the beginning of the layout, then create other instances when you need them. That way the new object are already in memory and creating them shouldn't slow down the game.

    If you're doing this already, then I may misunderstand what the problem is.

  • Wonderful, it works now!

    Thank a lot Magistross

  • Hi everyone,

    Is it normal that I can't use logical expressions in conjunction with other expressions in a "set text" action?

    For example, in the code below, the event 2 is working perfectly fine (when deactivating event 3), while event 3 is not working at all (when deactivating event 2). event 3 is always displaying "Paul" whatever the variable value is. I really don't see why...

    Is it a bug, or am I missing something? The same problem occurs in C3.

    (useful link if you aren't familiar with logical expression)

  • Just press F11 to play Chrome in full-screen mode. Press F11 again to revert to windowed.

  • I think I find a way to implement the 3 mirrored animation as well. It saves 3/8 of the memory, weight, etc. so it isn't even an option to implement mirrored animations in the animation editor. I did the test just to be sure, and if you mirror a sprite into the animation editor, it will be a different sprite when exported.

    Here's the code:

    Basically, I consider that top is 0°, right is 90°, left is -90°, etc. I named my 5 animations accordingly and play the animation based on this new angle.

    If the variable has a negative value, the animation is simply mirrored.

    Best of all, it automatically convert all 180+ angles to their negative counterparts, so no more confusion between MoveTo's 0-360° angles and Bullet's -180/180° angles.

  • newt

    Unconnected

    Thanks a lot! Very clever way to achieve that in only one event!

    For future reference, here is the code provided by newt. I just added 22.5 to the variable angmo in order to have the zombi move right if I click at a -0.1 angle from him (otherwise he's moving up-right, which is unnatural):

    set angmo to int((angle(touch.X,touch.Y,Sprite.X,Sprite.Y)+22.5-180)/45)*45

    The second event is just to display the angle values.