Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-20-2002, 08:29 AM
Graal2001_NAT Graal2001_NAT is offline
Registered User
Join Date: Sep 2002
Posts: 241
Graal2001_NAT is on a distinguished road
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?
__________________
GONE, BAI
Reply With Quote
  #2  
Old 09-27-2002, 01:39 AM
R0b1n-NPC R0b1n-NPC is offline
Registered User
Join Date: Sep 2002
Posts: 397
R0b1n-NPC is on a distinguished road
like clientcsr.vars?

(clientside read only)
__________________
- R0bin
Reply With Quote
  #3  
Old 09-27-2002, 03:53 AM
Graal2001_NAT Graal2001_NAT is offline
Registered User
Join Date: Sep 2002
Posts: 241
Graal2001_NAT is on a distinguished road
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
__________________
GONE, BAI
Reply With Quote
  #4  
Old 09-27-2002, 04:49 PM
R0b1n-NPC R0b1n-NPC is offline
Registered User
Join Date: Sep 2002
Posts: 397
R0b1n-NPC is on a distinguished road
bah
__________________
- R0bin
Reply With Quote
  #5  
Old 09-27-2002, 06:55 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
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
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #6  
Old 09-30-2002, 03:29 AM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
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.
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #7  
Old 09-30-2002, 03:40 AM
R0b1n-NPC R0b1n-NPC is offline
Registered User
Join Date: Sep 2002
Posts: 397
R0b1n-NPC is on a distinguished road
did you even read jagens post?
__________________
- R0bin
Reply With Quote
  #8  
Old 09-30-2002, 03:54 AM
Graal2001_NAT Graal2001_NAT is offline
Registered User
Join Date: Sep 2002
Posts: 241
Graal2001_NAT is on a distinguished road
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)
__________________
GONE, BAI
Reply With Quote
  #9  
Old 09-30-2002, 04:47 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
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.
__________________

subliminal message: 1+1=3
Reply With Quote
  #10  
Old 10-08-2002, 06:20 AM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
or or or!!!!!

//#SERVERSIDE
Reply With Quote
  #11  
Old 10-08-2002, 07:47 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Quote:
Originally posted by R0bin
or or or!!!!!

//#SERVERSIDE
Uhm, no.
__________________

subliminal message: 1+1=3
Reply With Quote
  #12  
Old 10-08-2002, 08:37 AM
Graal2001_NAT Graal2001_NAT is offline
Registered User
Join Date: Sep 2002
Posts: 241
Graal2001_NAT is on a distinguished road
Quote:
Originally posted by R0bin
or or or!!!!!

//#SERVERSIDE
doesnt exist
__________________
GONE, BAI
Reply With Quote
  #13  
Old 10-08-2002, 02:26 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
No **** ¬_¬
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:11 PM.


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