Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   NPC Sword and Shield no longer synchronised? (https://forums.graalonline.com/forums/showthread.php?t=134264116)

ffcmike 08-06-2011 02:54 AM

NPC Sword and Shield no longer synchronised?
 
It seems showcharacter NPCs where sword and shield variables are set serverside are no longer being sent to the client, is this something that's intended?

This is somewhat if an inconvenience due to the fact that I actually set these synchronised variables serverside where it makes sense so that it's only the specific variables sent to the client and less script.
Albeit it's a guess that this is the more efficient thing to do as opposed to having such a script entirely clientside, clarification would also be good.

ffcmike 09-04-2011 12:24 PM

Similarly it now seems as if npc.image is not synchronised to clients when using setimg(); serverside onCreated.

For instance with:

PHP Code:

function onCreated() {
  
this.setimg("light2.png");


The image is not appearing, whereas using setimg(); clientside or setting the image within the offline NPC script editor it's fine.

fowlplay4 09-04-2011 04:54 PM

Semi-related: It'd be cool if we could control the syncing behaivor. I.e:

this.variable.synctoclient([bool disablesyncing]); - Tells NPC to synchronize variable with client-side.

Twinny 09-04-2011 04:57 PM

Quote:

Originally Posted by fowlplay4 (Post 1666985)
Semi-related: It'd be cool if we could control the syncing behaivor. I.e:

this.variable.synctoclient([bool disablesyncing]); - Tells NPC to synchronize variable with client-side.

I can see this being handy

ffcmike 11-19-2011 05:17 AM

Quote:

Originally Posted by ffcmike (Post 1666960)
Similarly it now seems as if npc.image is not synchronised to clients when using setimg(); serverside onCreated.

For instance with:

PHP Code:

function onCreated() {
  
this.setimg("light2.png");


The image is not appearing, whereas using setimg(); clientside or setting the image within the offline NPC script editor it's fine.

I just realised now that the reason this wasn't working is simply because light2.png does not exist serverside. I think it's an image downloaded with the client rather than a mainfile, so setimg(); must be checking to see if the image exists before applying it and synchronising it, whereas setting it within the name field of the editor will still synchronise it.

light2.png should probably be added to mainfiles.


All times are GMT +2. The time now is 04:47 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.