Colludium's Forum Posts

  • When you say it doesn't work, what are you expecting to happen? It seems to work ok for me.

  • Are you are using the Touch plugin and, in the properties window in C2, does the plugin have Use Mouse Input set to Yes? That can cause touches to trigger twice, with a slight delay between - this might appear like it's skipping a layout at random intervals. The fix is to set it to No before export.

  • firebelly - I agree that it's good and bad now that it's been given to give it to the community.

    My fail comment was just because Ludei came out with a big positive blog and fanfare: "Today we’re releasing the new CocoonJS Plugin for Construct 2. WOOHOOO!!" After reading that I imagined that it might in fact work and not cause C2 to crash.... If the headline had read "we didn't really test it and, to be honest, we had better commercially driven things to be getting on with - so, there you go, good riddance to it / what a relief" then my expectations would have been better aligned with reality.

    I do think that this will be good in the long run, though - but only if there's someone in the community who has the time, skill and inclination to get in their and tweak the plugin for the greater good. I would love to give it a go but I am useless at coding...

  • I totally agree. Unfortunate timing of the message, I find it incredible that the other lad still has an account and can pm other members of the forum.

  • Yup - same for me. The 'new and improved' cocoonjs plugin is rubbish. Ludei = massive fail; it can't have been robustly tested at all...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I understand your reticence at spending money when you don't know the prog's capabilities. As long as you're not hoping to make an advanced game for mobile then I think you'll find C2 to be excellent (IMO) as a game development tool.

  • Thanks RamPackWobble! Excuse the moths, I'm just getting my wallet out...

  • Apologies to the mods as the only link to C2 is that this might improve the C2 community's morale. No links or anything from me - just Google search that idiotic company (allegedly) stil haus kitchens and check out their Facebook page. I was going to ask then publicly why they need to use spam bots.... There was no need - plenty of others have beaten me to it! Their page certainly made me smile.

    Again, I realise that the link to C2 is tenuous so may I ask forgiveness in advance...?

  • I just looked at the version number of your file. I can only think of one reason why you might be using r156 (I just googled it). Please don't expect help on this forum if you're going to steal from the developers at Scirra!

  • Here you go - try this version of you file. I removed all of the global variables. More flexible to keep them as object variables - you can then apply this technique to a family of objects without having to make things complicated.

  • leotaglia, could you re-post the link, but add a gap after the http - or put it in brackets or something so it doesn't get filtered. I'll take a look at it and help if I can.

    Edit - disregard!!

  • How are you dragging the object? There are plugins etc but you could just add the following code in place of my "--- Start your drag behavior...." above:

    • Trigger once: set variable Object.TouchDeltaX to: Object.X - Touch.X ; and set variable Object.TouchDeltaY to: Object.Y - Touch.Y
    • Set Object to position: X = Touch.X - Object.TouchDeltaX ; Y = Touch.Y - Object.TouchDeltaY (this will fire each tick that the object is in touch after the 1 sec delay)

    That second line can make for a jerky drag movement, so you could replace it with this, which will smooth things down:

    • Set Object.X to lerp(Object.X, Touch.X - Object.TouchDeltaX, 10*dt)
    • Set Object.X to lerp(Object.Y, Touch.Y - Object.TouchDeltaY, 10*dt)

    I think that should work... I hope I've got my minuses the right way round!

  • There are plenty of ways you could do this. One way (these are the sort of variables I would use, I hope my non-declaring them first doesn't make it confusing):

    If Object is not in touch

    • set boolean Object.inTouch to False
    • set Object.TimeToDrag to 0

    If Object is in touch

    • trigger once: set variable Object.TimeToDrag to time + 1.0
    • If Object.TimeToDrag < time and Object.TimeToDrag > 0

    --- Start your drag behavior (there are good examples in the tutorials, I think)...

    Hope this helps....

  • Can't think of how to fix the collision stutter - I've never found a way myself. For the creation of the sprite hesitation, could you create it somewhere else and just move it into view instead?

  • All very impressive! There's hope yet for us mortals...