![]() |
Quote:
|
Quote:
"temp.i" is a variable, which is pointing to the image object. When you use 'showtext' or 'showimg', it returns the actual image created (can also be obtained through findImg(index)). Which means you could even do like (though it's not a good idea) PHP Code:
PHP Code:
PHP Code:
Quote:
Quote:
echo(message) simply outputs the message to NC (or RC if you have the server option enabled), and since he's echoing a function, it will echo whatever that function returns. And yes, you can take all the functions you want to be in a shared class from the individual scripts and put them in a class, then join that class. Edit (in response to designating clientside/serverside): PHP Code:
PHP Code:
|
Ok, so I put the functions in classes, and uploaded the rest of the main script as a weapon, and this is the errors I got:
Quote:
|
Quote:
What join() do, is that it takes the content of the class (all the functions and such) and applies it to the script/object that is joining the class. |
Quote:
PHP Code:
PHP Code:
PHP Code:
http://img404.imageshack.us/img404/2161/picture8h.png |
Quote:
The callstack overrun happens when your script is executing too many functions too quickly. It'll probably go away if you switch the script over to clientside. (I bet you have a 0.05 timeout, which is too much for the server to handle). |
Quote:
And yeah, I didn't think about the fact that //#CLIENTSIDE isn't required in the level editor for clientside scripts. Good catch. |
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
Quote:
|
Quote:
|
Ok, so I have inserted my baddy script into a class, if I wanted to place baddies on the map with the baddie class as their script, would I be able to do something like a weapon with a trigger and some sort of putnpc script referencing back to the class? How would I do that serverside? I want the baddie to be seen the same by all players... would putnpc work with a class?
|
These wiki pages should help you a bit with your understanding of clientside/serverside:
http://wiki.graal.net/index.php/Clientside http://wiki.graal.net/index.php/Serverside http://www.graal.net/index.php/Creat...Starting_Guide http://wiki.graal.net/index.php/Crea.../Script/Client (explains how to communicate between serverside and clientside) Quote:
Quote:
And yeah, GS1 just uglifies a beautiful script. GS2 is also considerably more efficient than GS1. Quote:
Quote:
Quote:
Quote:
Quote:
PHP Code:
PHP Code:
|
Quote:
I will have to lookup putnpc2 since I have never used it. Also, if I wanted to do something like a toggle, say: PHP Code:
|
Quote:
player.vars can be added serverside or clientside (and changed), but there are some disadvantages (and advantages). For serverside, you can add a player.var. This is not synchronized with clientside. For example, "player.staffLevel = 4". On clientside, you can use it for storing objects or something. However, they are cleared when the player logs off. You can do stuff like "player.equippedItem = this" for equipping standard weapons. Quote:
PHP Code:
Quote:
PHP Code:
|
Quote:
Another thing, I was under the impression that variable type is automatically detected, but it seems like setting a variable to a string of text doesn't work? Trying to do something like this: PHP Code:
PHP Code:
PHP Code:
Doesn't this work? PHP Code:
|
All times are GMT +2. The time now is 05:55 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.