Quote:
Originally Posted by callimuc
ah ok i had the setlevel2("blabla",10,10); but without player.setlevel2("blabla",10,10); but it still wont wor, but i dont have any errors now
so do u mean i should make like:
PHP Code:
function onCreated() { //blabla Warp000(); } function Warp000() { //or function onWarp000() { i have seen this two what should i use //blabla }
|
No, not at all.
I mean like:
PHP Code:
function warpPlayer(level, x, y, chatText)
{
setlevel2(level, x, y);
player.dir = 2;
if (chatText != null)
player.chat = chatText;
else
player.chat = "Warped";
}
This way, if you wanted to change the direction for all warps, you would only need to change it in one place, saving you time and money (you pay for gold right?).
And onSomething is generally used for events rather than bog-standard function yet I've them being used as if there is no distinction.