TheDom's Forum Posts

  • Nice job

    eli0s , I'll always expand on answer if you need it. just ask. Just so you know, that while you technically can't declare a Boolean value with a global variable with C2 in the same way you can with an instance variable. The alternative to to simply use 0 for false and 1 for true as follows.

    Here's an example of how I use numbers to represent TRUE and FALSE

  • See, you learn something new everyday...

  • Get rid of mouse object. The touch object has "use mouse input" by default in the properties dialog when selected.

    If you have to have both,(mouse & touch objects) put all mouse object conditions and events into a group (Mouse Group) and all touch object conditions and events into another group (Touch Group).

    Then use System > On start of Layout (create sub events)

    ------------Is on mobile device > System>Mouse Group "Disable"

    ----------- Is on mobile device (X) > System>Touch Group "Disable"

    (X) being inverted

    Also code your mouse group like the first example I gave above.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create a dual or 2 conditions together for the AI slab and squares as follows:

    On touched object > AI Slab > What ever your event

    On touched object (X) > square >

    the (X) being inverted

    this will keep the AI slab from activating an event meant only for the square and probably you need to do the reverse for the square.

    On touched object > square > What ever your event

    On touched object (X) > AI Slab >

    You might need to make the inverted condition in each scenario "is in touch" because C2 might not let you couple the identical conditions. But you should get the general idea.

  • Definitely a challenging question. Always a good idea to make a new post because maybe someone else has a solution already. In the meantime, I'm thinking about it. Can you describe a little more of the scenario?

  • I understand your thinking but, that doesn't make sense to me or could be very confusing in many scenarios in the game development process, if you really think about it but, you can right click and select "send to bottom of layer" or use the Z order dialog box. Also if you place them on separate layers, (which is a better development practice) you can hide the layer by unchecking the layer in the layer dialog box. This is especially a better practice to avoid confusion during the development process as you'll find out when you start to develop more complex games.

    Hope that helps.

  • Spawn an object there anyway at touch.X, touch.Y but make the object's property invisible.

    Then use "on touch end" for the invisible object to spawn the visible object. You can then add system wait (maybe 0..5 seconds) invisible object destroy.

  • If I understand you correctly,

    Create a small delay in the event portion of the same condition. Try different amounts time plus or minus till you get the desired effect

    On Land (Condition)> System>wait 0.5 seconds

    • ---------------------------------------->Ring Box Destroy

    Remember the code always runs from top down. Events triggered within the same condition tend to run at the same time but using "wait" forces it to wait before triggering the next event in a given condition.

    I'm assuming the player needs to jump off again before it's destroyed. If I misunderstand you or alternatively, you can create an invisible object underneath the "ring box" object that has the actual solid behavior or some combination of this and the above example.

  • Try something like:

    You need to create a dual condition or 2 conditions in the condition.

    You can use a global variable with number value likeCurrent Level

    On Touch > "Image Level 3"

    System > Current level (is equal to or greater than ) 3 > System go to layout 3

  • Create a global variable called URL, set it to text, and leave the value blank

    Global text URL = ""

    Create a blank sprite (fill it with anything, color, etc...) I'll call it "Picture" for this example.

    I don't know what conditions you want to use but, it's the events portion that matters here.

    System> On start of layout > System > Set URL to "http://www.whatever.com/your_image.png"

    System> On start of layout > Picture> Load image from URL (keep current size) or set to (resize to image size)

    You'll be using sprite instead of the background object and you can change the condition to anything you want.

    Hope this example helps...

  • There is a tutorial that covers this and it's easy to follow.

    https://www.scirra.com/tutorials/448/arcade-style-high-score

    You'll be able to modify it easily to suit your needs.

  • That's a solid approach, common sense, I use the same thing.

  • Your image links weren't loading for me but if I follow your description, check your parallax settings.

  • Use

    Touch > on object touched > "Image Name" Set animation "Animation Name"

    Touch > on object touched (X) > "Image Name" Set animation "Default"

    (X) being inverted

  • It should work. have you actually tried it?