Jump to content
Millu

Player Look directly at event Script Request

Recommended Posts

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.
fbOaIFf.png

I will appreciate any help with this :)

Share this post


Link to post
Share on other sites
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 by Traverse

Share this post


Link to post
Share on other sites
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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted