![]() |
join command
Im a little (meaning totally) confused on how join works. Could someone give me a simple example on how to use it? I just cant seem to grasp that command, and maybe one of you guys/girls can help me out.
thanx. |
join blah;
it will add in the coding of what ever is in the txt file blah |
:-D
Very well put...
|
thanks
thank you very much!
so, if i have a file called bomb.txt i could put in another NPC join bomb; Thanx! |
It works on p2p only and the script needs to be in a class.. (they can be added manually in the scripts directory of your FTP) or via NPC Control.exe
|
:)
okay, I'll look into it.
|
Here is my post:
Say you have a butterfly. You code the butterfly. Then, you save it as a class. Then, you create many butterfly npc's in NC: if (created) { setstring this.image,butterfly.png; this.x=30; this.y=30; } join butterfly; What join does is pastes the script from the class file. Very helpful. This was a fragmented and hard to understand post from Boco. |
bococ I like your avatart
|
Okie, the NPC server doc says this:
"the internal representation is slightly different: each npc has a list of scripts, the own script is parsed and added as the first script in this list; when you do join then another script is parsed and added to the script list; when the script for the requested class is already in the memory (used by another npc) then it is not copied, it is just added to the script list; so when several npcs are using the same class then it is only hold one time in the memory and the script object is put into the script lists of the npcs; functions can be overwritten" Can someone translate that to english? |
I wonder...could join be used with lists of functions, like:
in every npc, if(created){join standard_funcs;} in NPCs in area Bomboria, if(created){join bomboria_funcs;] ? |
it jsut adds what is in the class file to the script so it is posible.
|
Quote:
You dont need to put it in any functions... here is an example of how I use it... NPC Code: I have the join outside of any if statements because when you join it its putting all the coding that you have from whats in that class file into the npc (not really putting it into it but thats how it reads the script) |
Quote:
|
?
|
Quote:
|
okay, i know how to use join class already
i'm just wondering what its talking about when it says "memory" and "script lists" =P |
Quote:
|
okay, nothin new then =)
|
join script;
joins the script located on npc-server. available on npc-server (p2p servers) only. |
Quote:
(btw, andor_npc-admin1=me :) ) |
using join to make a function library is quite useless without gscript supporting function parameters
|
Quote:
|
| All times are GMT +2. The time now is 09:29 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.