Millu 0 Posted March 3, 2018 I need script that allows event to move only if player is not facing it I know that it might be possible to do it with events but I think that its too much to do So as on the picture below I want to move event to player if he is not looking at his direction just like SCP 173 Works also useful could be giving view distance so event will be moving normally in a distance for 20 blocks from player and and behave like 173 in distance of 10 blocks from player another useful thing that will be helpful is adding region that will act as a wall so basically when this region is between player and Event it will prevent this event from freezing and it will be moving even when player is looking directly at Even. I will appreciate any help with this Share this post Link to post Share on other sites
Traverse 144 Posted March 3, 2018 (edited) 6 hours ago, Millu said: I know that it might be possible to do it with events but I think that its too much to do It's really not. Making a script for this would involve almost exactly the same steps as making an event for it, except instead of clicking on event commands you will be typing code - and typing a lot more of it in order to reference player positions and map event(s), ect. I'm sorry to say this, but if you think making a mechanic like this is so difficult that you need a script for it, you will be running into a lot more problems before you finish your project. This is actually exactly the sort of thing that the event system is built to handle by itself. The only thing I might consider doing by script if I were the one making it is the wall-region check (to take advantage of the while/until loops) and even then I would still just use a script call instead of a full separate script. And it still wouldn't save all that much time compared to doing the check all by event, the only difference is you'd be using a bunch of event conditional branches instead of a single while loop. I mean this in the least offensive way possible, but if someone else made a script for this (and I have a hunch there are already existing scripts for similar LoS mechanics anyway) it would take pretty much the same amount of effort as doing it by event - it would just be someone else putting in the work, instead of you. Edited March 3, 2018 by Traverse Share this post Link to post Share on other sites
Millu 0 Posted March 3, 2018 7 hours ago, Traverse said: It's really not. Making a script for this would involve almost exactly the same steps as making an event for it, except instead of clicking on event commands you will be typing code - and typing a lot more of it in order to reference player positions and map event(s), ect. I'm sorry to say this, but if you think making a mechanic like this is so difficult that you need a script for it, you will be running into a lot more problems before you finish your project. This is actually exactly the sort of thing that the event system is built to handle by itself. The only thing I might consider doing by script if I were the one making it is the wall-region check (to take advantage of the while/until loops) and even then I would still just use a script call instead of a full separate script. And it still wouldn't save all that much time compared to doing the check all by event, the only difference is you'd be using a bunch of event conditional branches instead of a single while loop. I mean this in the least offensive way possible, but if someone else made a script for this (and I have a hunch there are already existing scripts for similar LoS mechanics anyway) it would take pretty much the same amount of effort as doing it by event - it would just be someone else putting in the work, instead of you. So you say there will be no difference between making it with events and script Share this post Link to post Share on other sites
RetroExcellent 369 Posted March 3, 2018 Correct. Using a parallel process and common events that you can call with each event would make this work pretty well. I did something similar with a horror game I made when the event touches the player (or in case of event matches x and y locations) you take damage. This would work very similarly. Share this post Link to post Share on other sites
Millu 0 Posted March 4, 2018 So I did it with events and it has some limitations but for my project is enough thanks for any help with this Share this post Link to post Share on other sites