Can anyone explain to me what is wrong with my logic?

0 favourites
  • 7 posts
From the Asset Store
100 items casual and logic games. All icons are of a high quality.
  • Simply trying to get a skeleton to move towards player until it comes within range (I use 32 pixel LOS here) then switch to attacking animation. Switch back to idle animation and move towards player again once out of range.

    What I am getting is skeleton moves towards player, switches to attack animation, then is stuck attacking forever in the same spot.

    Thoughts?

  • There is nothing wrong with your events that will stop the Enemy in that state forever, it should work.

    I will check first:

    -If all the enemies have (LOS = 32) because if they have a big LOS then that will prevent them from switching to no Attacking

    Also, check on the Debugger:

    -If the MoveTo is enabled as you may have another event setting the MoveTo disable

    -You can check to swell the enemy State if it switches to No Attacking so you know there is something wrong with the LOS

  • I can't for the life of me figure out what is going wrong here. The skeleton moves toward the player as expected and stops when in LOS range (meaning the LOS range is not the problem). It just won't resume moving once the player moves out of range again. I tried switching sprites and the same thing is happening.

    The debugger is showing that the state does not change back to not attacking, It's stuck in attacking for some reason

    I even made a new project with the same logic and it works perfectly fine...

    Any ideas?

  • I tried switch out the player sprite and that seems to work, so it seems to be something wrong with the player. Its as though once the skeleton gains LOS to it, it doesn't lose LOS again

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry for the triple post but Disabling solid on 'player' has fixed the issue. No idea why this would make a difference but there you go.

  • Sorry for the triple post but Disabling solid on 'player' has fixed the issue. No idea why this would make a difference but there you go.

    Honestly is very confusing on C2 they followed one system for years and on C3 they changed it so:

    On C3 if you have solid on the object it will not trigger the LOS

    On C2 however, if you have solid on the object it will trigger the LOS

    Here is an example:

    Using the last C2 Version

    https://www.dropbox.com/s/bofqrbm7lc7kyfk/LOS.capx?dl=0

    -If you open on C2 you will see that it triggers the LOS by setting the Opacity for the black sprite

    -But if you open it on C3 it will not trigger, not sure why they don't follow one system

    The same thing they did with the Load from As.JSON they changed how the system works and they broke all the projects that use C3 R288 and lower unnecessary making people wasting time hours of work redoing all the events, not sure why they keep doing this as it's not professional at all.

    Here is the Link:

    https://github.com/Scirra/Construct-3-bugs/issues/5964

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