gvintedois's Forum Posts

  • 2 posts
  • and how i do it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "estado" = state

    "indoDireito" = going right

    "indoEsquerda" = going left

    "atacando" = shooting

    I was programming the AI of an enemy in my game, but I had forgotten to consider the existence of other enemies of the same type in the scene, so I started changing the code with the help of ChatGPT. Unfortunately, the chat went into a loop where every time it explained how to fix my problem, it just made my code messier, until it got to the point where I no longer knew how to fix it.

    In this case, the wyvern_enemy are acting on their own, each going in a different direction, but they’re no longer advancing through their 'states' and are only approaching the player once (which would be the first command). I believe the issue is in the wait function, but I no longer know how to fix it.

    As a bonus, if anyone has an idea on how to prevent them from overlapping, I’d be very grateful. The chat suggested using the solid behavior with a tag.

    =========

    Eu estava programando a IA de um inimigo em um jogo meu, mas tinha esquecido de considerar a existência de outros inimigos do mesmo tipo na cena, então comecei a alterar a programação com ajuda do chatGPT, só que o chat, infelizmente, entrou em looping que cada vez que ele falava como corrigir o meu problema ele só embolava mais minha programação, até chegar no ponto que já não sabia como corrigir.

    Nesse caso, os wyvern_enemy estão agindo de forma própria, cada um pra uma direção, só que eles não estão avançando de "estado" mais e estão somente se aproximando do player uma vez (que seria o primeiro comando). Acredito que o problema seja na função wait, mas já não sei mais como corrigir isso.

    Um plus, se alguém tiver uma ideia para afastar a sobreposição deles, seria muito grato, o chat falou em usar o comportamento de sólido com etiqueta

  • 2 posts