dop2000's Forum Posts

  • On mobile you can only request full screen after a touch event. (like On Tap or On any touch end)

  • I usually do this:

    On start of layout:

    ...AJAX request "somefile"

    ...Wait for signal "AJAX_Finished"

    ...Enable user interface, do other stuff

    On AJAX "somefile" completed:

    ...Dictionary load from AJAX.LastData

    ...Signal "AJAX_Finished"

  • scaffa

    I did something similar for another post:

    construct.net/en/forum/construct-2/how-do-i-18/sticky-block-130564

  • From 8 events to 4, and it was quick and simple, awesome!

    Here is the same in just one event and one action:

  • I think the Dictionary is better suited for this task.

    When an item is unlocked, add a new key to the dictionary. Save the dictionary to local storage the same way you save your arrays. (AsJSON)

  • You can set the object to be global. Or you can save this peerID in an array when switching to another layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your images are broken too.

    Just post the link to capx without the "https://" part

  • You can't block touch events, but you can ignore / filter them out.

    Just add another condition "Is touching BigBox" and invert it:

    On touched SmallBox

    NOT Is touching BigBox

    This event will not be triggered when you touch both sprites.

  • 1. I think you missed the condition in my demo where I'm comparing Sprite.ID=Target.ID

    This is how you define the correct drop area for each sprite - using the ID instance varible on both sprites.

    2. Instead of the global variable for incorrectDropCounter you can make it an instance variable on the family.

    Then it'll be counting incorrect placements per instance.

    If you still can't figure this out, please share your capx.

    You can pm it to me if you don't want to post the link here.

  • jmg89

    Here you go:

    https://www.dropbox.com/s/28o9bf9o4rmw4 ... .capx?dl=0

    I used one sprite with different frames. You can use a family with multiple sprites if you want.

  • Try to keep the origin point at the same distance from the bottom of the image on each frame.

    You can search tutorials section for examples. Like I said, it's a common trick, so you will definitely find some.

  • Wow...

    If you have to repeat the same event more than twice, you should definitely optimize it.

    Add all sprites to a family, define Drag&Drop behavior on the family. You'll be able to keep just one event "Family on Drop" and remove all duplicates!

    Add instance variables to the family: StartX, StartY, TargetX, TargetY

    On Start of the Layout (or On Family Created) set StartX to Family.x, set StartY to Family.y

    I'm not sure how your game works and where do you get values for TargetX, TargetY. You might need to set them manually per each sprite on the layout.

    On Drop - if dropped on a wrong spot, set object position to (self.StartX, self.StartY)

    If dropped correctly, set object position to (self.TargetX, self.TargetY)

  • What do you mean "letterbox scale doesn't work"?

    If your game is designed for 16:9 aspect ratio, then on 18:9 screen you should get black bars on top and bottom of the screen.

    Is this what happens?

  • Replied in email.

  • Angelsgaming

    Yes. It's a common trick, used in many platform games. You actually control an invisible rectangle sprite, and the character sprite is like a "skin" pinned to it.

    That way the animations on the character sprite don't interfere with Platform events.