Colludium's Recent Forum Activity

  • 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...

Colludium's avatar

Colludium

Member since 26 Aug, 2013

Twitter
Colludium has 11 followers

Connect with Colludium

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies