Announcement

Collapse
No announcement yet.

Ignore actor when colliding

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ignore actor when colliding

    I have a door where when the player steps in, it allows you to press a key and enter. The issue is when enemies touch the collision while the player hasnt pressed the key, even though I have overlap only pawn and only wrote the code so that it only reacts if the actor is equal to player, the player is no longer able to open the door unless it leaves the collision and enters it again. I have also tried Ignore actors when moving, also doesn't work. Can anyone give me any other suggestions please? Thanks in advance.
    If you want to see my UDK games, have a look at my website!

    #2
    If beginoverlap actor = player -> cast to player character -> Set BOOL true: If boolean is true, player can open door.
    If endoverlap actor = player - > cast to player character - > set BOOL false: If boolean is false, player can close door.

    If there was an overlap and the actor wasn't player -> do nothing.
    same for the end overlap.

    There shouldn't be a problem because when another actor enters the overlap then it would not set anything.

    If this didn't help, please show me your setup of logic.
    http://www.frostfire.ee Game development & resources

    Comment


      #3
      I have begin overlap - branch (if other actor == player character) { run all code}. The issue is that, as you say, another actor should be ignored, I even have overlap only pawn. The issue is that they turn off the code as soon as they step into the collision when they are following the player. Hope I was able to explain this properly.
      If you want to see my UDK games, have a look at my website!

      Comment


        #4
        Player overlaps trigger -> set the boolean true. No matter what, this boolean will stay true. NO CODE WILL BE RUN HERE
        Back at the player -> Press Interact key > boolean was false -> Nothing happens. -> Player overlaps trigger -> boolean was set true -> player presses Interact Key -> boolean is true -> door opens.

        IF this doesn't work use the condition "Has tag?" and add the player a tag.
        Last edited by xintoc; 04-21-2016, 04:05 PM.
        http://www.frostfire.ee Game development & resources

        Comment

        Working...
        X