Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Faster way of serverside... (https://forums.graalonline.com/forums/showthread.php?t=38235)

Graal2001_NAT 09-20-2002 08:29 AM

Faster way of serverside...
 
Could a way be added to make it less laggy to use serverside commands constantly? For something I am making, I will be needing to access all players/npcs attributes constantly and I already know that will generate a ton of lag, or how about this idea (which I would prefer more), maybe make a way to use
with(npcs[index]) and with(players[index]) to fetch attributes as long as you do not edit them?

R0b1n-NPC 09-27-2002 01:39 AM

like clientcsr.vars?

(clientside read only)

Graal2001_NAT 09-27-2002 03:53 AM

kindof, I was asking more of a way to use with(players[index]) clientsided as long as you don't edit anything, but stefan said that it cant be done currently since other attributes aren't sent to the client :(

R0b1n-NPC 09-27-2002 04:49 PM

bah :(

emortylone 09-27-2002 06:55 PM

You mean instead of something like this:
NPC Code:

if (actionserverside)
{ for (i=0;i<allplayerscount;i++)
{ if (strequals(#a,#p(0)))
{ id = playerid;
this.bombs = players[id].bombs;
readbombs();
}
}
}
//#CLIENTSIDE
if (weaponfired)
{ triggeraction 0,0,serverside,NPC,#c or what not;}

function readbombs()
{ what you want to do with it;}


That DOES seem like an awful lot of work... perhaps make a simple trigger like that built into an NPC, like triggeraction 0,0,serverside,-triggers,bombs,#c; or something. I was considering making a hidden NPC named -triggers so that I could use common triggers whenever.
---Shifter

Com013 09-30-2002 03:29 AM

Quote:

Originally posted by R0b1n-NPC

(clientside read only)

There's already "local." for that. Flags starting with local. won't be sent to the server.

R0b1n-NPC 09-30-2002 03:40 AM

did you even read jagens post?

Graal2001_NAT 09-30-2002 03:54 AM

Quote:

Originally posted by emortylone
You mean instead of something like this:
NPC Code:

if (actionserverside)
{ for (i=0;i<allplayerscount;i++)
{ if (strequals(#a,#p(0)))
{ id = playerid;
this.bombs = players[id].bombs;
readbombs();
}
}
}
//#CLIENTSIDE
if (weaponfired)
{ triggeraction 0,0,serverside,NPC,#c or what not;}

function readbombs()
{ what you want to do with it;}


That DOES seem like an awful lot of work... perhaps make a simple trigger like that built into an NPC, like triggeraction 0,0,serverside,-triggers,bombs,#c; or something. I was considering making a hidden NPC named -triggers so that I could use common triggers whenever.
---Shifter

I am trying to NOT have to do that since there is some lag time in that, I am asking for a way to get other attributes without going serversided

another suggestion:
maybe make a serveroption
sentflags =
and any string in there would get sent to the client, like if i had
sentflags = clientr.hp
and if you are in the level with someone, you could access this string by doing
#I(sent.clientr.hp,id) or maybe something similar? (this is kindof like players[id].x vars but would be a string and you get to choose what strings get sent via serveroptions)

Falcor 09-30-2002 04:47 AM

Quote:

Originally posted by Graal2001_NAT

I am trying to NOT have to do that since there is some lag time in that, I am asking for a way to get other attributes without going serversided

another suggestion:
maybe make a serveroption
sentflags =
and any string in there would get sent to the client, like if i had
sentflags = clientr.hp
and if you are in the level with someone, you could access this string by doing
#I(sent.clientr.hp,id) or maybe something similar? (this is kindof like players[id].x vars but would be a string and you get to choose what strings get sent via serveroptions)

Stefan said he'd do something similar, wether it will be in the next version is arguable, but I wouldn't count on it.

R0bin 10-08-2002 06:20 AM

or or or!!!!!

//#SERVERSIDE

Falcor 10-08-2002 07:47 AM

Quote:

Originally posted by R0bin
or or or!!!!!

//#SERVERSIDE

Uhm, no.

Graal2001_NAT 10-08-2002 08:37 AM

Quote:

Originally posted by R0bin
or or or!!!!!

//#SERVERSIDE

doesnt exist

R0bin 10-08-2002 02:26 PM

No **** ¬_¬


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

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