Khelben's Forum Posts

  • Hello guys,

    Lately I have been trying to make a bgame using gamepads, but I would love to keep the keyboard available for "player1".

    The thing is, I spawn my 4 players using the same object but spawning a difference instance, with a variable instance "ID" growing (0-1-2-3).

    Then when I use the keyboard, I specify, "pick the player with player.id=0" and simulate the 8 direction. so that's basicly :

    keyboard -> when left arrow is down

    player -> pick instance with player.id=0 --> simulate 8 direction pressing left

    But when I do that, I launch the game, and all my players instance are moving with the keyboard, at the exact same time.

    Would you happen to know what could cause this ? I can't seem to find the answer... verifyed the id etc, all seems correct !

    Thanks a lot,

    Mael

  • Hi Jeremy,

    Thanks a lot for your help ! You have well draw my problem.

    It made me search elsewhere and I found that the problem was caused by the fact that my detection circle around a player is in the same container that this one.

    So when I tell him to find "players" in collision, it doesn't want anything else than its instance.

    It's fixed !

    Thanks a lot !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • HI, thanks for the advice but I need to pick an object here. One that collide with my detection sprite (which is a circle around the player).

    If I "for each" all the player, it still doesn't find out which one is collinding my circle... Which is weird ! I also say to him not to pick the one with id=0 cause it's the player himeself (gamepad 0)

  • Hello everyone,

    I am currently struggling with the fact that I can't operate on 2 different instance of the same object, inside a unique event.

    hostingpics DOT net/viewer.php?id=121994help DOT png

    Here am trying to find an overlaping instance "player" set with a unique ID, and then destroy it. But I also have this same object (which has ID=0) inside the overlaping sprite, and this one I can't destroy.

    "EtreAnime" is a sprite pinned to "player', it also has the same unique ID and is in the same container.

    Am kinda lost here guys, do you know what i am doing badly ? Tryed many things but "is overlapping" just doesnt detect my other player

    Thanks a lot,

    Cheers,

    Mael

  • Hello everyone,

    I am currently struggling with the fact that I can't operate on 2 different instance of the same object, inside a unique event.Here am trying to find an overlaping instance "player" set with a unique ID, and then destroy it. But I also have this same object (which has ID=0) inside the overlaping sprite, and this one I can't destroy.

    "EtreAnime" is a sprite pinned to "player', it also has the same unique ID and is in the same container.

    Am kinda lost here guys, do you know what i am doing badly ? Tryed many things but "is overlapping" just doesnt detect my other player

    Thanks a lot,

    Cheers,

    Mael