Try changing cone of view from 120 to other values and run the game again (I suggest trying 30, 60, 180, and 360)Īnother thing to try (and this one is quite important) is the size of the lights. Now in his properties find "Line of site" in the behavior section. Select the player (spPlayer) either by clicking on him in the layout view or selecting him from the object list on the right hand side of the screen. These chosen lights have thier opacity turned right up to 100% - these light can now "cut" through my shadow layer to reveal the layer below. The game loops through my vast list of events doing:Įvent 1 turns the player towards the mouse and turns all the light to zero opacity - (which, in this case, means they have no effect on the layer below).Įvent two any light in the players cone of view (not hidden by the rocks) is chosen. In my example "line of site full grid.capx" I have filled the shadow layer (layer 1 !) with a grid of "lights". The line of site (note spelling) allows you to attach a behavior to your (player) - this behavior (see manual entryĪllows you pick what is in the players field of view taking into account any obstacles and a maximum distance to see (which we could use for torch power for example). Construct 2 has a built in line of sight behavior - if we use this on our shadow layer.
0 Comments
Leave a Reply. |