Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Can barrier prevent ENTER?

A topic by Garry Francis created Feb 10, 2020 Views: 73 Replies: 2
Viewing posts 1 to 2
Submitted

I think I've normally avoided barriers in the past. Now I remember why. I've got one location where you can either GO NORTH or ENTER BUILDING, but only if the guard has been disabled. (This is a fictitious example, by the way.)

Is there any way to use block_path to block N, as well as ENTER BUILDING, or should I just do my own thing?

Host

Yes, it's possible in the normal way ...

I tested this and it blocks entry from N or ENTER (assuming both at between inside and outside in the connection table):

   block_building : block_path {
      block_when_not         = is_has_given_oracle_something
      from                   = outside_building
      to                     = inside_building
      message                = Oracle Prevents
   }
   
Submitted

That was quick. I was going to say don't bother, as I've reverted to the DIY way. I'm sure your code is what I had and it didn't work. Maybe I still had the manual way for the barrier with ENTER and it was taking precedence. If so, it probably didn't have the condition check, as I'd only just added the boolean to use for the test. Anyway, works now.