Im making a game based off the night cage board game. In which there are tiles but if you move to the side and lose direct line of sight or if one of the tiles walls are blocking the (adjacent) line of sight they disappear and are randomized upon reappearance
Im pretty much stumped ive tried everything i have thought of but it doesn’t work (i don’t remember exactly what ive tried)
Basically i would like help making tiles that arent in adjacent view disappear and as its turn based stop it from passing through walls (note the sides of the map are like pacman it just goes to the other side) any help is greatly appreciated
I would recommend using the ray length to __ block. It's in sensing, and ray length is an option under distance to __.
Here is a project that uses that block. The player points in the direction of the mouse-cursor. If the player "sees" the object, then a line from the player to the object shows up. Snap! example line of sight (berkeley.edu)
A couple problems, first, if neither the wall nor the object are in the line of sight from the Sprite, the block will report true, when neither Sprite can actually be seen. A fix would be to add POINT TOWARDS target above the report bock.
Second, the custom ray length block should report -1 if the Sprite is not seen, to be consistent with the primitive.