Action areas in way system

  • #1, by red363Wednesday, 10. March 2021, 19:50 3 years ago
    Greetings.
    Can you please tell me if it is possible to deactivate / activate action areas in way system?
    Thank.

    Forum Fan

    101 Posts


  • #2, by esmeraldaWednesday, 10. March 2021, 22:10 3 years ago
    you can not deactivate the action area itself but you can wrap the action triggerd by the action area in an if-query.

    action entering (or leaving) action area:
    if condition x is true
      do stuff
    end if

    Key Killer

    513 Posts

  • #3, by red363Thursday, 11. March 2021, 01:47 3 years ago
    you can not deactivate the action area itself but you can wrap the action triggerd by the action area in an if-query.

    action entering (or leaving) action area:
    if condition x is true
      do stuff
    end if
    Thank you very much for your answer! I got the idea. The question is, I want to implement this scenario:
    The player is hiding from the patrolman. If he turns out to be in the field of view, that is, enters the action area (from cover) at the moment when the patrolman sees him, you will lose. Now I have done it as follows: If a patrolman enters a zone, it becomes dangerous for the player, and if he enters this zone, death. If the patrolman leaves this area, it becomes safe for the player. The problem is that if the player is already in this zone and the patrolman enters there, nothing happens (since the player is already in this zone, i.e. the action is complete before the patrolman entered this zone and the variable switched) You can do something Any suggestion on this topic?

    Forum Fan

    101 Posts

  • #4, by esmeraldaThursday, 11. March 2021, 12:27 3 years ago
    Mh... my idea would be: change condition_1 to true when the main character enters an action area and back to false when he leaves it. Same with condition_2 for the guard and his action area.
    Every time one of the characters enters an area do a check if both conditions are true. 
    You could do that by using a combined condition. (combined condition_3 is true if condition_1 and condition_2 are true)

    Key Killer

    513 Posts

  • #5, by red363Saturday, 13. March 2021, 03:33 3 years ago
    Mh... my idea would be: change condition_1 to true when the main character enters an action area and back to false when he leaves it. Same with condition_2 for the guard and his action area.
    Every time one of the characters enters an area do a check if both conditions are true. 
    You could do that by using a combined condition. (combined condition_3 is true if condition_1 and condition_2 are true)

    Thank. I solved it a little differently, without the combined conditions. I just created two conditions: condition 1 (player in the zone) and condition 2 (patrol in the zone). When a player enters the zone, condition 1 is met, if condition 2 is met - death. When patrolmen enter the zone, condition 2 is met, if condition 1-death is met. It works.

    Forum Fan

    101 Posts

  • #6, by lwen-heuTuesday, 16. March 2021, 07:42 3 years ago
    In your spare time visit the geometry dash site a good choice for you.
     

    Newbie

    1 Posts