I’ve created my own desert bush. Simple enough, right?
I’m even foregoing letting players pick them up, to ensure the NPC is not broken by being moved off its origin level.
Here’s the code.
[php]if (washit) {
hide;
putleaps 0, x, y;
timeout = 10;
}
if (timeout){
show;
}[/php]
As I said, really simple. However I wish to learn if there are any rules I need to follow.
If a timeout is set and the last player leaves the level - would the timeout break? How would the script behave for the next player that enters? I need to make sure I’m avoiding a potential multiplayer “hazzard” of the NPC hiding and never showing again. I hope there is some insight into how reliable timeout is and if I’m doing the right thing by avoiding (created) and (playerenters).
Alternatively… I could do this:
[php]if (playerenters && isleader && !this.ini == 1){
this.ini = 1;
show;
}[/php]
Think that’s a necessary addition?