Is there other way to detect if player is near house entrance?
#1

Hello, I want to show Info Box to player if hes near house entrance, is there some another way instead of timer? Thanks.
Reply
#2

OnPlayerEnterCheckpoint or OnPlayerPickUpPickup is your only options.
Reply
#3

OnPlayerEnterDynamicArea from streamer, make one dynamic area for each entrance ?
Reply
#4

I'm using streamer, so I can try it, just not sure for example i will have like 200 houses if it won't cause lag (when I create area for each house). But hopefully should be better than low interval timer.

//Edit seems to work pretty good with streamer area, thanks!
Reply
#5

I guess streamer also use a Timer, just internally on another thread.
Reply
#6

Quote:
Originally Posted by Riwerry
Посмотреть сообщение
I'm using streamer, so I can try it, just not sure for example i will have like 200 houses if it won't cause lag (when I create area for each house). But hopefully should be better than low interval timer.

//Edit seems to work pretty good with streamer area, thanks!
They both use resources (although streamer is not as heavy as a low interval timer) but difference is streamer doesn't use server resources directly so as long as your system stats are not too low you'll be fine.
Although there is another way to do it and it's pickup ID 1 but as it says Will trigger OnPlayerPickUpPickup every few seconds.
Scripting with that is probably a little tricky to not annoy the player while he is for example typing a /me or sth at the house's door.
Reply
#7

It's working fine with streamer areas though, but now I've tried to script thing, that will prevent player to see my InfoBox when he's teleported on pickup area for first time. (Outside house is pickup for enter and inside is pickup for exit). And I don't want show InfoBox to this player until he leaves area pickup. That means if he comes back he will normally get infobox. It's little bit buggy, I've used OnPlayerEnterDynamicArea and OnPlayerLeaveDynamicArea + I'm teleporting player outside/inside house and detecting in which pickup area he is in KeyStateChange..

(I have stored area ids in variables of both Enter and Exit area)


//EDIT: I did it..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)