WRS's Recent Forum Activity

  • Use custom obstacles for the Line Of Sight behavior.

    Thank. I will try.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi everybody. Who made the glass?

    How to create an object such as glass, it must be solid so that it cannot be passed through it, but it must be transparent so that you can look through it.

    The player must be carried into the glass, that is, it has a solid behavior but at the same time it must be transparent to the "field of view" behavior

    Tagged:

  • trigger once while true (this will trigger once for the instance of the object, if there are more it will trigger for each and every one of them), or global variable, set can play to 0 and if played set it to 1 if user goes in screen and canplay=0 set 1 play song, if is =1 doesn't play.

    Yes, it worked, needed a global variable. Thank!

  • What condition can solve the problem with looping sound reproduction?

    If the player is in the field of view of the camera - the alarm is activated.

    The problem is that if a player repeatedly gets into the camera's view, the music is turned on and on. Even the use of a variable does not save.

    It should be. No matter how many times a player gets under the camera's vision, the music starts once and plays all the time.

  • Patrolling with pathfinding:

    https://www.dropbox.com/s/nglwbuzmdjpd7os/PatrollingEnemy2.capx?dl=0

    Thank. I will disassemble)

  • WRS

    for my sample, you can have as many triggers as you want and move them anywhere. You just have to change the angle of the trigger to point to the next one (and make sure they are lined up so that the patrol will hit the next trigger).

    Yes, I figured it out, there was a bug in the construct, and after the new load everything started working)

    Thank you very much

  • Try this one:

    https://www.dropbox.com/s/eeuzglzwkdimlv3/PatrollingEnemy.capx?dl=0

    Oh, thank you very much)

    If this circle is working fine) And if this is a difficult route, then it turns in one direction. I will try to create additional triggers and turn to another side. It may help.

  • Another way to do this is with Pathfinding behavior - for each enemy find path to the next patrol point. Pathfinding will take care of sprite rotation, acceleration/deceleration etc.

    Then you have to create a lot of unique triggers?

  • WRS

    it was a little more complicated than I expected when there were multiple patrol objects and lots of triggers. In my sample, patrols move until they hit a trigger, they then turn until they match the angle of the trigger, then start moving again.

    If a trigger is set to an angle of 90 degrees, C2 sometimes thought it was a small fraction off (like 90.00002), so you have to round the angles before comparing.

    I also ran into trouble when multiple patrols were overlapping triggers at the same time - you have to make sure you are comparing to the correct trigger.

    then, if the difference in direction is more than 180 degrees, you probably want to turn the shorter direction, so in that case the patrol turns -5 degrees.

    you can get my sample here:

    https://www.rieperts.com/games/forum/patrol.capx

    EDIT: one important note is that, obviously, if the patrol is turning 5 degrees (or -5 degrees) per tick, then you have to make sure the angle of the trigger is a multiple of 5 - otherwise the angle of the patrol will never match up with the angle of the trigger and it will just spin around on the trigger forever...

    The system is very difficult to work and if I just put triggers in a different order, then everything is working to work (

  • Thank you so much guys. Already broke his head on this.

  • Using the behavior of the bullet and triggers, I create a model patrol, when the object touches the trigger, it is rotated 90 degrees but does so sharply, but should do so smoothly.

  • thank you very much, I will try to do

WRS's avatar

WRS

Member since 2 Feb, 2019

Twitter
WRS has 3 followers

Trophy Case

  • 5-Year Club
  • Email Verified

Progress

6/44
How to earn trophies