Coin-coin le Canapin's Recent Forum Activity

  • Hi.

    Here are two screenshots from my project.

    The upper one is when I run it on localhost, the other one when I upload it on my website. Notice how the walls (and only them) are smaller after the upload.

    url of the uploaded project : http://canapin.com/Bboin_Divertissement ... t_swap_03/ (shift to change walls)

    Any idea about how to resolve this weird issue?

  • :dumb:

    Thanks !

  • Hi. I'm trying to compare and set a Dictionary variable, but it doesn't work.

    I tried to set up a similar variable on another object, and it works this way.

    Does anybody know why? Maybe I'm not properly using the Dictionary object?

    about the .capx : the shift key triggers the function.

  • Hi again :

    http://canapin.com/construct/test/test_swap.capx

    So, I'd like a function which swap every object having "variante = 0" in the decoration family with other objects in this family which have the same name (each door have a variable 'name' = 'door' and same for the trees) and "variante = 1".

    The purpose is beeing able to switch a lot objects with a single function (for example, if I have 50 regular objects and 50 "alt" objects in decorations family...).

    I tried some things but I didn't managed to do it.

    edit :

    I think I'm moving toward a solution. I used the container functionnality. Each element is linked to another element. These two linked elements are on different layers but have the same position. I'll prevent the game to interact with objects on this background layer and I just have to create a function to make them switch their layers, which should be not very difficult.

    http://canapin.com/construct/test/test_swap/

    The moving background A is linked with the red shape B via the container functionnality. They both have the same X Y coordinates.

    The green tree J is linked with the blue tree K. They also both have the same X Y coordinates.

    A and K are on the background layer. They could be invisible too. When I interact with the drag'n droppable grey square, I collide only with the elements on the front layer.

    So, that's it : if I'm able to swap the element layers, that should do the trick. Sorry if my explanations are bad, I'm not that good in english.

  • Hello,

    Thanks for your reply.

    I'll publish a file in a few hours.

    I don't want to use frames or animations, because this kind of element swapping will be available for other and more complicated stuff like enemies (replacing an enemy by another ; same X and Y positon, same animation and same animation frame, etc), which will have their own animations like walk, attack and so on.

    A few years ago, I had the same kind of issue for my shoot'em up, when I wanted to spawn a specific element of a family. The only solution I found on this forum was this one :

    spawn a random object in the family : if not the wanted object (for exemple if variable name != laser if I want an object of 'laser' type), destroy the newly spawn item and try again. If the wanted object, just break the loop.

    That's ugly and slow (especially with a lot of objects in the family), but it kind of works.

  • Try Construct 3

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

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

    I'm trying to create a function to swap some elements in my game.

    Basically, I currently have this "obstacle" family :

    wall 1

      name = "wall" type = 0

    wall2

      name = "wall" type = 1

    tree1

      name = "tree" type = 0

    tree2

      name = "tree" type = 1

    rock1

      name = "rock" type = 0

    rock2

      name = "rock" type = 1

    My function would do this : for each 'obstacle' on the layout, replace it with an 'obstacle' having the same name and "type = 1"

    Any idea about how to do that?

  • Hi.

    All is in the title

  • Thank you.

  • This way it will not be mirrored using B imagepoint position as a "symmetry axis".

  • Hi.

    If A is pinned to an imagepoint of the object B, and I mirror B (horizontal symmetry), what is the simplest way to make A following B mirroring?

  • I tried exposure but it doesn't fit at is keep blacks black.

    I tried brightness and it seems to work, with a default value of 100.

    Thank you

  • I want the sprite to be white when hit, not invisible.

Coin-coin le Canapin's avatar

Coin-coin le Canapin

Member since 22 Dec, 2010

Twitter
Coin-coin le Canapin has 1 followers

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies