Containers not working as intended?

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hi.

    I'm in a trouble, here. I'm trying to make a prototype for an isometric 4+ player vs game. One of the mechanics is you can block incoming projectiles with a shield.

    The thing is, I tried a couple of methods and the one that sounds like it should suit it the most is using the container plugin so I can:

    1)Have just 1 object of the player's "hitboxs" (and multiple instances for each player)

    2)With the container, 1 "shield" object so I can link them to each Hitbox instance.

    This way I can really simplify the ammount of events for each player interaction and having centralized everything just with variables.

    It seems to work fine making each shield invisible/visible with each player's input, but the problem is that multiple inputs seem to interfere/bug the link between hitboxes and their correspondant shields:

    If more than one players shields, none of them can "stop" (the shield wont go invisible) until the last one releases its button.

    Capx

    https://drive.google.com/file/d/11YNYuNVw_va5j7Vk6wzMmj0WCVceX-dg/view?usp=sharing

  • First of all, remove rex's Container plugin from your project, and WebStorage too. These are very old, long deprecated plugins.

    The problem is not with the containers, but with wrong usage of "Else" in event 39. "Else" doesn't mean "all other instances". It means that if previous event didn't pick any instances, only then the "else" block will be triggered.

    You need to remove "Else" and change the event to this:

    Hitbox is NOT B -> Shield set invisible

    (add "Hitbox is B" and then invert it)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First of all, remove rex's Container plugin from your project, and WebStorage too. These are very old, long deprecated plugins.

    The problem is not with the containers, but with wrong usage of "Else" in event 39. "Else" doesn't mean "all other instances". It means that if previous event didn't pick any instances, only then the "else" block will be triggered.

    You need to remove "Else" and change the event to this:

    Hitbox is NOT B -> Shield set invisible

    (add "Hitbox is B" and then invert it)

    Thanks. I've managed to fix it a while after posting this (it was delayed because it needed moderator's approval because of the link attached).

    Still, I'm glad there's people around that cares enough to download a capx amd give a reply this quick and useful. Thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)