![]() |
Lame Questions, of a Lamer Guy, who knows nothing about NPC-Servers.
Hello. I am a Lame Question asking Lamer guy who knows nothing about NPC Server. here are my questions:
1. Serverside and Clientside. As far as I understood, Clientside is for retrieving info from a player, and setting his animations only. Serverside does all the work. Am I right? 2. Strings which use client., can they be saved on serverside part of the script? More Lame Questions to come! |
3. Is theer any way to put an NPC That does stuff without putting it on player or level, or calling for it with 'join' so bascally that nPC is everywhere...
|
1.) Light effects are handled on the clientside part as well, animations can be set either way, think of client and serverside this way, whatever is clientsided, is running on your computer, whatever is serverside is running on the server (graal's computer)
2.) client.strings can be read and wrote to bother server and clientside 3.) I don't get the question but if are asking if a player needs to be present in the level to execute the script, no the player does not, if the script is serverside the npc will still be working, like if the npc is scripted to move randomly, the npc will continue to move randomly with or without a player |
Quote:
-Jinx |
Some scripts need to run constantly.
A good example is anything that uses timeouts or whatnot to interact with other NPCs and with players using only with commands...like the Market-Control on newmain and similar. |
Quote:
NPC's that wonder around the whole server even if the server is empty. The growing one can prabably be easily done just by using timevar though. >.< Bomies on G2k2 can wonder around even if there are no players there. Otherwise thier all bunched up. // which it seems they are anyway now. omi. Actually I think stuff that moves around can be done with timevar too..... just would be kinda laggy for the first instant the player eners the level.. |
timevar? do explain.
|
Quote:
|
Timevar is for time keeping. What time of day and such, and for time systems. For #3, simple enough. A d/b (or database) NPC runs constantly on the entire server. While it DOES have a level, it can be warped, and updating the level it is in does NOT update the NPC. You have to have NC (NPC Control) rights to make/view/modify them.
---Shifter |
Quote:
Control-NPC has no level. Timevar can have more uses then just time keeping. |
Quote:
|
Quote:
---Shifter |
Quote:
|
Ah, yes, a timeout of 0.1 CONSTANTLY without a real purpose does lag. However, 0.1 is MANY times faster than a person can see the difference in, so 0.25 or .5 work better for things that aren't like movement and such. When I did my chat NPC< I used a timeout of 1, because anyway it will lag, and it will compensate. If you are worried about an extra .9 or so seconds, get over it :P You do NOT make a d/b NPC switch levels every 0.1 seconds x.X You obviously aren't comprehending the POINT of it! x.X You might make a pet, and the pet will find a player, you would do something like this:
NPC Code: of COURSE you would have it not be on top of the player, but it would be USELESS for me to post the entire coding here... ---Shifter |
Quote:
warpani.gif in a NPC , animates when you are in the level, Stops and freezes when your out of the level until you reenter it (Kind of like a sleep commmand just for you the client) then it stops sleeping and actions and commands start when you re enter the level. So with a NPC server the script and actions STILL run with or without you or anyone in the level or not. Why it matters it still runs: I think we will find that without scripts running without a player in a level, then the ''Train'' script such as on 2001, Would only work if a player is in the level, and if it did this, Itwouldnt move with nobody on it, and would depend on someone being in a level to work. As you can see this is inconvinent(sp?) so its important we can make a script run without someone in a level or we wouldnt get the smooth effects such as Trains and Creatures that walk around the Overworld through levels (Sometimes without a player in them). Someone can confirm this as I started learning about NPC server, and serverside/clientside differences in scripting 1 day ago, So I probally got it all wrong, but thats what I think it is |
LOL, like you can make scripts that will READ to/from an NPC. Like you can do:
NPC Code: that would read the control-npc and set a this.string from the player. The Control-NPC is VITAL in most cases... you need it to be able to do things and such. It replaces server.strings for the most part, and you can do MANY things with it. Just because no on is in the level, should the timer stop?? So what if the playercount on the server was 0, should the timer not continue?/ x.X ---Shifter |
What does [i] do? It's used very often, but I don't quite understand it's purpose..
|
Quote:
So allplayers[2] would give you the 3. player (count starts at zero), allplayers[i] gives you a player depending on the current value of the variable i. |
I just relized how hard it whould be to have this all scripted out making ur own game and all it must have took at least over 20 months for scripting bombs joltbombs everything superbombs puting all the GFX together i wonder how long it did take them all.............
|
LOL, you can't just put allplayers[i] because I would have no value!
NPC Code: ---Shifter |
Quote:
|
What would be more laggier NPC server or without one?
|
Isnt the scripts of a npc server laggy?
I know some are |
When i scripted about 1 1/2years ago i hated the Mp3/Mid players they had when u change the # into 1.mp3 or 1.mid so i made something better so u can just say play name.mid
then about a year ago i just fixed it up and now it doesnt cause that much lag It use to take about 3 minutes for it to play the song i added tokenize to it and it sorta did it a lil quicker then i took out the flags and just did if (startswith(play,#c)) { tokenize #c; if (strequals(#t(2),.mid)) { play #t(1).mid } if (strequals(#t(2),.mp3)) { play #t(1).mp3 } } |
| All times are GMT +2. The time now is 05:29 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.