TheColdVolcano's Recent Forum Activity

  • I am currently trying out a vertical infinite scrolling functionality. While auto-scrolling can be easily implemented by setting the Y position as

    Self.Y - ScrollSpeed * dt

    However, What I am trying to achieve is the the backgrounds would scroll infinitely but only when the player is moving vertically.

    This is my layout:

    There are three backgrounds: Red, Green and Blue. So whenever a player moves upward the backgrounds should repeat infinitely in sequence Red, Green, Blue and when the player is moving downward the backgrounds should repeat infinitely in sequence Blue, Green, Red.

    How exactly to achieve functionality?

  • Create a static variable. Set it to 3

    Set a recurring timer for 1 second

    Every time the timers goes off, subtract from static variable, then check if the variable is <= 0

    Used is Timer running action and every second set the subtracted countdown value. That pretty achieved all that I wanted! Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am using this as an example for my game. However, in addition I want to add a 3, 2, 1 Go kind of countdown. So basically, right now we are setting the flag to wave if there is an overlap for 3 seconds. So as soon as the overlap starts, I want to subtract 1 from timer every one second till it is zero and display it in the gameplay (basically indicating the seconds one need to keep it overlapped for the flag to be set to waving). Timer behaviour hits just once. Any idea on how to go about it?

  • Hello, Is there a way in which we can get the IID of pinned object?

    Let's say an object B is pinned to object A. Whenever the player collides / overlaps with object A, I want to fetch the IID of object B and set a different animation for object B.

    Right now with what I have implemented, if I change the animation for one of the instance of the object, it changes for all of the instances of that object.

  • > > Like Maverick said create the spawned objects into a family.

    > >

    > > You can also save a bit of memory by inverting the "is overlapping" event so that the object won't spawn at all. This will work better if "on destroyed" is scoring points etc.

    >

    > But how can I test is overlapping without creating the object first?

    Consider you have 4 slots of object spawning.

    Pick random slot that not being chosen(isChosen = false).

    After picked, set isChosen = true.

    Then the next ones will pick the slots that has isChosen = false only.

    I have flying objects in the layout and what is happening if I create an object randomly at X with Y = 0, then sometimes the object gets created on those flying objects. I guess with this approach the issue won't be resolved.

  • > > Add that object into a family.

    > > If object overlaps family, destroy it.

    >

    > SVG's cannot be added to the family?

    I don't know why you said it can't

    My bad I was trying to add two different object type in the same family. Even if I create a family how can I test if it is overlapping anything in the layout before creating the object?

  • Like Maverick said create the spawned objects into a family.

    You can also save a bit of memory by inverting the "is overlapping" event so that the object won't spawn at all. This will work better if "on destroyed" is scoring points etc.

    But how can I test is overlapping without creating the object first?

  • Add that object into a family.

    If object overlaps family, destroy it.

    SVG's cannot be added to the family?

  • I have scenario where I have to create objects (of different size and shapes) randomly on X-axis with Y = 0 at every X seconds. However, while creating I have to ensure that the object does not get created on other objects (i.e. not overlapping).

    Please note that the objects once created start scrolling down the Y axis! Once the object leaves the layout, they are destroyed and new objects are created from the pool with Y = 0.

    Any suitable suggestion are welcome :)

  • There it shows the completed version in the screenshot. However, I am not sure how those round edges were created. How do I specify the radius for the edges?

  • I saw that 9-patch plugin can be helpful in this. But I am not sure how to do it?

    I have already checked this topic and want something like that.

    https://www.construct.net/en/forum/construct-2/how-do-i-18/border-radius-sprite9-patch-151558

  • That I have already disabled. Forgot to mention it in the post

TheColdVolcano's avatar

TheColdVolcano

Member since 3 Feb, 2021

Twitter
TheColdVolcano has 1 followers

Trophy Case

  • 3-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

5/44
How to earn trophies