![]() |
Scripts not working online.
Hey there!
I have been trying to revive X-Online and I must say that the new engine and everything totally confuses me. I used to have Grim Squeaker (I bet some remember him) around to do the scripting for me, but he's been gone for ages and now I am on my own. It's just too bad that I know nothing about scripting (except for some simple, old scripts) and therefore I fail at trying to fix his old scripts. Now, one of those happen to be lighteffect scripts. They work perfectly offline, but once I try to test them online, they are not even showing me the slightest bit of light. So what am I doing wrong here? :( [edit]: So someone told me to make it Clientside (I had no idea I had to..). So when should I made something Clientside or serverside? |
You should make everything that is important (like saving data or calculating data) serverside. Stuff that should be made clientside is stuff such as lights, which would be the same if they were shown serverside or clientside anyway.
Think about it. If each client is seeing a light clientside, then they are all seeing the light, so it doesn't need to be serverside. Serverside scripting also prevents hackers from easily changing data... Lights are mostly just for show and stuff, so it really doesn't matter what hackers would do to them clientside. Basically: Important things that need hack-prevention - serverside Everything else - clientside There are a few exceptions... like if you have an npc that moves through levels, then it needs to be serverside, because it's x/y coordinates need to be more global and not tied down to each client. |
I see. That will clear up a lot of errors from X-Online.
Thanks! *hug* |
Also remember that a lot of GS1 doesn't work on the serverside of a GS2 server.
|
Quote:
Things that don't work on the serverside simply don't work on the serverside, regardless of which language. |
2 Attachment(s)
So, I did some changing in light effects (making them clientside), but suddenly things pop up and are acting like light effects while they have no such scripts!
Suddenly a cloud went transparant and a door became glowing red and resizing itself. Any idea how this could be happening? I added a screenshot for more information. |
Usually happens if you update the level with RC or normally i guess, just reconnect, always worked for me.
|
Quote:
I see. Whenever I try to update a level, it updates the entire gmap and warps everyone to one particular level. Is there a way to fix that? |
Quote:
Nobody on the server should receive an update of the entire GMAP. Ever. |
Maybe I applied the gmap wrongly then. Because no matter what I do, I remain on the gmap, even when I warp to a specific level.
But maybe that is because I am not used to using one (I mean, I first tried to make a bigmap.txt to work and stuff.. go figure. ;)). Maybe I should just not update the level anymore. :P |
I believe levels automatically update, and if not, just reconnect.
|
Hmm. I still have a script that works flawlessly offline, but no matter if I do //#CLIENTSIDE or //#SERVERSIDE, it won't work offline!
I am stunned. I tried all sorts of things. :P |
Quote:
Here is how the model works. PHP Code:
|
| All times are GMT +2. The time now is 09:46 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.