![]() |
Help
Can somebody help me with this why is its hiding everything accept the names of the players?
PHP Code:
|
Showstats
PHP Code:
PHP Code:
|
I recommend doing it inside a //onPlayerEnters()// to make sure that it stays that way.
|
So just add...
PHP Code:
...to the bottom. |
Quote:
HTML Code:
function onCreated() |
I don't see how there's a difference, both functions are called regardless.
|
Yeah but onCreated() is only called once. onPlayerEnters is called every time a player enters the level so it gets called more.
|
Quote:
Doesn't matter though, since when you enter it will call onCreated if you make it call onCreated when you enter either way, thus allowing you to set it up in the onCreated instead of the onPlayerEnters. |
If you don't understand, that's your own fault. We're correct.
|
Quote:
If you can't explain it, then it's the same as not understanding. |
Quote:
As far as I can see it, "JkWhoSaysNi" explained it. ;) |
Quote:
Ok, consider: a: PHP Code:
PHP Code:
Now, if a player enters the level with a: onPlayerEnters() gets called and onCreated() gets called then the rest of the script gets executed b: onPlayerEnters() gets called and the rest of the script executes. Since onPlayerEnters will get called more than onCreated() b is the most efficient. I don't think i can explain it any clearer than that. |
You're both wrong. You should only need to call showstats once. If it doesn't stay as you set it, there's another script interfering.
And it's good practice to not call onCreated(). |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
Thanks for clearing that up ^^ |
Quote:
|
Quote:
Yes, as someone might put in a level to show different stats. Which is why you need it onPlayerEnters. It's the same with custom tilesets, in theory you should be able to just set them once but if a level changes it, it'll never get changed back if you just do it on onCreated(). |
You're all nerds
PHP Code:
|
Quote:
and you start your post with.. "You're all nerds".. You didn't need to put that first line in your post.. And, it is not needed to use two showstats, its fine to have it in on of the functions.. |
Quote:
|
| All times are GMT +2. The time now is 03:28 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.