Tsardall's Recent Forum Activity

  • In this situation whene a square is 7pixel near an other square having a special variable, the square detected should change colour. For this I use LOS, but the way my event is structured, each square with special variable checks every ticks (i guess) if there's an other one near which obviously cause lag.

    So I would need to fix this by only calculating if there's squares near whene a button is clicked but also have the colours display until it updates.

    Thank you

  • I tried your first option, but could make it work...

    This is contexte:

    The squares represent territories, the yellow ones have the variable ''Unowned'' and the reds ''Owned'' but they all have the variable ''Adjacent''. So if a yellow square touch the red (owned) ones the ''adjacent'' variable would change to 1 (meaning it's touching) and then if its equal 1 I change the colour of those touching.

    So I need to know how to change the variable ''adjacent'' of the unowned squares in dirrect contact with the reds.

  • I have tried using overlapping and LOS condition to know if a copy of the sprite is near, but I wasn't able to make it detect only if the variable of this copied object is for exemple: 1.

    In short

    I would like to know how to do this:

    If object is overlapping and that overlapping object instance variable = 1

    then

    change this object colour...

    Thank you

  • You do not have permission to view this post

  • It works but the hitbox of the 3d shape is completely off, so my square can go into the shape but theirs also an invisible wall because of the weird hitbox. I only need the shape to pârtially go over the 3d object that's why I need the hitbox.

    (I am also using a 3d camera)

  • But this completely changes its position, I need something that can put the sprite over the 3d the same way layers or Z order would do.

  • For exemple, on the image below, the red square is under the 3d object and I would need it to be projected over it instead. I tried putting the square in a new layer above the one that contains the 3d object but it didn't worked. Also the only way I found to make the 3d object appear under the sprite is to put an higher Z value than the hight of the 3d object which is not practicle. So I would like to know if there's a way to achieve this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have tried with 2 different variable instead of signals before, but I couldn't figure out how to make it work since I can only compare the two to each other.

    Because of that I would like to know if it's possible to send a signal each time the desired variable changes.

    Tagged:

  • You do not have permission to view this post

  • Is there a way to use sprite.count and simply add an other expression that would make it so it only count the sprites that have the desired variable?

    It would be so much simplier if it's possible since I haven't used loops often.

  • Eg:

    I want to set a global variable to the number of sprite that have eg_variable=1

    Thanks

  • Thank you again.

    About the Avanced Random plugin, It was what I was using at first but the result where never the same. In short, the number

    of sprite affected(for eg.set value to 1) were never constant.

Tsardall's avatar

Tsardall

Member since 13 Jun, 2021

None one is following Tsardall yet!

Trophy Case

  • 3-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies