Underdog's Forum Posts

  • Hi Colludium

    thank you but by default, C2 will put the new sprite atop of the older ones. Since I have several sprites that can be spawned randomly on Y, the issue will be that sprites that are supposed to be behind some of other sprites will end up in front.

    However, after hours of try and error, I finally found a solution that I will share with everyone, in case it could help others...

    Don't hesitate to ask me a Tuto if you need it!

    First

    • Create one sprite that called "RAIL" and duplicate it how many times you would like on the Y axis.
    • On your Sprite (enemies for example), add the variable RAILUID

    Second:

    • Spawn your sprite enemies by picking a random "RAIL" ==> On sprite enemy, Set Enemy.RAILUID to RAIL.UID

    Third and finally :

    • For Each Enemy
    • If Enemy.RAILUID = 73 (for example) ==> Move Enemy behind RAIL
    • System Pick RAIL where RAIL.UID = 74 ==>

    Increment it how many times you have RAILS

    • If Enemy.RAILUID = 74 ==> Move Enemy behind RAIL
    • System Pick RAIL where RAIL.UID = 75==>

    Enjoy! Joy! and Freedom!!!!!

  • Btw, I also tried the technique where I linked another Sprite called "UP" to the "SPRITE"

    If "UP" is overlapping "SPRITE"

    "UP.vrUID" is different than "SPRITE.vrUID"

    "UP.Y">"SPRITE.Y" =========================> "SPRITE" move to bottom of layer

    "UP.Y"<"SPRITE.Y" =========================> "SPRITE" move to top of layer

    This technique works but does not solve the issue because if I have a "SPRITE" that is between 2 "SPRITE"(s), he will always be on Top of the layer instead of being in front of the "SPRITE" that is <SPRITE.Y and behind the other "SPRITE" that is >SPRITE.Y

  • Hi everyone,

    I usually use UID, Zorder without any problems but for this one, I have no clue how to do it.

    I would like to manage the Zorder between the same instances that are spawned each X sec.

    If Sprite.Y > Sprite.Y ==> Move on top of Object Sprite

    If Sprite.Y < Sprite.Y ==> Move on behind of Object Sprite

    The issue, as you may probably guess, is I don't know how to get the correct Sprite.UID and even then, I'm not sure it is the correct way (duh)

    I usually do the following but it does not work and it is normal that it does not:

    Pick by evaluating Sprite.UID

    Compare Sprite.UID is different than Sprite.UID

    Sprite.Y > Sprite.Y ===========================> Move behind Sprite

    I know that it is wrong but I don't find the solution after many hours of testing a few different approaches

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi and LittleStain

    I tried again Blend Mode with Source atop, and it is working.

    Thank you guys, I did not know what I was doing wrong, but you help me to gather in this direction.

    Do you know if it is working on all devices?

    Thanks

  • Thank you guys, I tried blend modes with different FX but the result is not what I would like to do.

    It displays the entire object even if it is bigger than the popup or it is in additive...

    I did not find the masking Effect, this is exactly what I am looking for

  • I forgot to mention that the list of objects is bigger than the Pop-Up. So the Player needs to scroll inside the Pop-Up.

    Scrolling is not the problem, I found great tutorial about it but it is mainly on how to contain the objects within the pop-up

    Thanks again

  • Hi everyone,

    I'm looking for a way on how to display a list of items within a Pop-Up Menu.

    The intention is to have the items (sprites) displayed only within the Pop-Up Menu that is on another layer and above the game.

    The Pop-Up Menu is smaller than the screen in order to have the Player being able to see what is happening behind.

    Do you know a way contain and render the objects within this "box"?

    Do we have something like display when overlapping (visible partially only the part that is overlapping)?

    Thank you!

  • It'S strange It works here. Did you try to die? The idea is to make appear the UI window above the Game layout if the Player dies

    Thanks for checking.

  • DUTOIT

    My apologies DUTOIT, I tried it again in order to do a quick example and the secret is that I have to create a Main Menu first in order to load each Layout I need to.

    punkineo

    I struggled to use the function. I did not know what to put as Parameter <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    Here is a capx example of what I want to do. Let me know what you think about and if this is the correct way or if you have a better way.

    https://www.dropbox.com/s/qdkt5bqm9ium8 ... ample.capx

  • DUTOIT:

    Thanks for the TUT but it does not work for what I want to do.

    In the TUT, it is mainly to display a UI from the start of the layout, I tried to use the same approach but when the Player dies, I want the game to display the Result window. which is different.

    punkineo

    Thanks again, it seems to be the best approach.

  • Thanks Punkineo.

    Indeed, I did not think about Function.

    If I do this, does it mean that the datas of UI are duplicated?

    Meaning that the app will be heavier or it will only load the datas once for all game layouts?

  • Hi everyone,

    Is it possible to display a Layout above another layout in C2?

    I don't want to use Layers because I would like to create several layouts for my UI options that could be called on different Game layouts and I would like to keep the Game Layout below.

    Imagine that each Game Layout is a new level / world.

    I don't think to copy/paste all UI layers on each Game layout is effective.

    Thanks

  • I had the same problem but I fixed it with UID and Pick event.

    Try the Selection by UID and check the range, it should work

  • woaouuu. Thanks again Emoaeden.

  • Thank you a lot Emoaeden.

    It is exactly what I was looking for.

    For XP and Level Up, should I use the same technique or should I use Tobye's Tutorial approach? Then each time the Player levels up, I link the global value "level" to the XML?