ScarlieGem's Recent Forum Activity

  • I know that the way you have the code set up isn't picking things correctly.

    Like, if you had a player sprite and a block sprite, and when the player touches any block, it destroys the block. It doesn't destroy ALL the blocks, just the one you touch. That's because when you have the event "When Player collides with Block" it picks the specific player that touches the specific block. That's why only that block is destroyed.

    So notice that your code says "if any characters have a line of sight to any characters" essentially. You need to add another condition that weeds out stuff that you don't want.

    i managed to do this, and it works like you explained, it doesn't check if any or all, it checks for each one of them, now i gotta find a way to "invert" this code and check if there is no insance of characters on sight.

    also thanks your tips are simple but they are helping me figure out stuff by bits faster than i'd be able to do if i tried by myself.

  • Hi, that is what i've been trying, i got something to work but i can't get the "

    " to work, it constantly changes to the "fight" state if any of them is seeing each other, no matter how far they from each other.

  • Oh ye, this might also help you guys understand what i want to do and maybe point out what i'm doing wrong.

  • 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 make a simple game where characters walk around (they are controlled by the pathfinding behaviour, not controled by players) and i'm with an issue, i wanna make an object called "character" move towards another instance of the tpye "character" when they get in range.

    Example:

    All of these are the same sprites but with different variables.

    I want them to targent each other when any of them enter the LOS, and once they either kill the opponent or lose the track of them, they just go back to the "wander" state, where they randomly walk around trying to find people.

    I've tried the los behaviour, the turret behaviour and even tried making my own custom LOS object but nothing, they just stay stuck at either fight or wander state.

ScarlieGem's avatar

ScarlieGem

Member since 10 Mar, 2022

None one is following ScarlieGem yet!

Trophy Case

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

Progress

5/44
How to earn trophies