Wertle's Recent Forum Activity

  • For a bit more clarification of what I mean, here's a screenshot of some debugging. The text set for Sprite0.Value is inconsistent on which instance it's pulling the variable from (sometimes it's the sprite being dragged, sometimes it's the one collided with).

    Is there a way to differentiate between these two instances in the Event sheet so that I can get both of their values?

    <img src="http://storage.wertle.com/constructQuestion.JPG" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey folks, my question might end up being one of those easy things that's just difficult to figure out how to search.

    I have multiple instances of a sprite with an instance variable called "Value," which is a different number for every instance. I want to make it so that when two instances of the same sprite collide, I add their values together and store it in a variable.

    How do I differentiate between the two instances of the same sprite in the "is overlapping" event? If it were two different sprites, it would be Sprite1.Value + Sprite2.Value in the resulting action, but if they are both instances of Sprite1, how do I get the value from each? (Sprite1.Value + Sprite1.Value doesn't work)

    I'd know how to do this if it were two different sprites colliding or if I were scripting it traditionally, but I'm stumped here.

    Let me know if you can help, thanks!

  • This plugin is awesome, thank you so much!

    One note on a change I made to your drag-to-pan events. It's probably already on the forums somewhere but I'll put it here in case drag-to-pan searchers find this thread first :)

    In the original, if you drag, let go, then touch and drag again, the window will pop back to the center. If you want to retain the new window position (so you can keep dragging with multiple gestures without it resetting) make these changes:

    Make 2 new variables (I just called them StartingPositionX and StartingPositionY) and at layout start set them to WindowWidth/2 and WindowHeight/2 as default values. Use those in the Scroll To action, then on touch end, update those positions to where you've scrolled to.

    Basically change this:

    <img src="http://storage.wertle.com/construct2/dragToPan1.JPG" border="0" />

    To this:

    <img src="http://storage.wertle.com/construct2/dragToPan2.JPG" border="0" />

Wertle's avatar

Wertle

Member since 23 May, 2012

None one is following Wertle yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies