Is there other way to detect if player is near house entrance? -
Riwerry - 26.12.2015
Hello, I want to show Info Box to player if hes near house entrance, is there some another way instead of timer? Thanks.
Re: Is there other way to detect if player is near house entrance? -
ikey07 - 26.12.2015
OnPlayerEnterCheckpoint or OnPlayerPickUpPickup is your only options.
Re: Is there other way to detect if player is near house entrance? -
PrO.GameR - 27.12.2015
OnPlayerEnterDynamicArea from streamer, make one dynamic area for each entrance ?
Re: Is there other way to detect if player is near house entrance? -
Riwerry - 27.12.2015
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!
Re: Is there other way to detect if player is near house entrance? -
ikey07 - 27.12.2015
I guess streamer also use a Timer, just internally on another thread.
Re: Is there other way to detect if player is near house entrance? -
PrO.GameR - 27.12.2015
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.
Re: Is there other way to detect if player is near house entrance? -
Riwerry - 27.12.2015
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..