Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   global variables? (https://forums.graalonline.com/forums/showthread.php?t=70649)

Novo 12-08-2006 08:47 AM

global variables?
 
PHP Code:

//#CLIENTSIDE
function onCreated()
  {
  
player.global.var = 3;
  
player.globalr.var = 4;
  } 

to comply with:

PHP Code:

//#CLIENTSIDE
function onCreated()
  {
  for ( 
plallplayers )
    {
    
temp.sum += pl.global.var;
    
pl.global.var ++;

    
temp.sum2 += pl.globalr.var;
    }
  } 

Basically... A variable that can be edited clientside that is sent to all other players. global.var can be edited by any player, whereas globalr.var only by the player themselves. This would be sent through udp for optimization...

That's my suggestion!

Tyhm 12-08-2006 08:58 AM

grrr.

Crono 12-08-2006 03:58 PM

Quote:

Originally Posted by Tyhm (Post 1251392)
grrr.

whats wrong tyhm :(

Twinny 12-08-2006 04:07 PM

That would be sweet.

Tyhm 12-08-2006 07:15 PM

I keep asking for Global Variables in the sense of intra-server, now you're asking for Global Variables in the sense of, I dunno, intra-player within a level?

A fine idea, but you stole my name. :-(

Skyld 12-08-2006 07:19 PM

Quote:

Originally Posted by Tyhm (Post 1251491)
I keep asking for Global Variables in the sense of intra-server, now you're asking for Global Variables in the sense of, I dunno, intra-player within a level?

A fine idea, but you stole my name. :-(

Why are global variables required? Use an ircbot and a bit of collaboration if you want to achieve it that badly.

Tyhm 12-08-2006 07:31 PM

Sure, I could do passwords, ircbots, webscripting, etc. to emulate a PS2 finding another game's savefile on your memory card - and giving you an extra song from K.K., or tikigod, or whatever. But:
1) officiality. It'd be ghetto to jury-rig something like this, like strapping a truck mirror on a honda.
2) Security. Passwords can be cracked, IRCBots fooled - less so when it's server-to-server communication.
3) Support. Stefan's a busy guy, sure, but if he makes this in Graal and all the servers have equal access to it, they're more likely to support it than if it's one server's "shared" feature. See also: nobody showed up for the Graalympics.

But for Local Variables, the topic of This thread, good idea, poor name. Or perhaps my own project should upgrade to Universal Variables.

Novo 12-09-2006 03:05 AM

I was thinking of server-wide global...

Use for them? Perhaps just updating the player's health to all players online... For statistics... Lets say you're in a party, and you want to know what everybody's health is. It's not EXCESSIVELY important. And it wouldn't matter if the data never came across... But it would help with lag.

Admins 12-09-2006 03:05 AM

For the clientside-thing you can use player.attr[] which should work in most cases, although it's not directly sent to the other players via udp.

For global data we can use the irc-communication things right now (there are ways to verify from which server/script the data comes, although not fully documented). In the near future there will also be a way to send requesttext/sendtext messages to other npcservers, which then can be used to load, exchange and store data.

Novo 12-09-2006 03:08 AM

Quote:

Originally Posted by Stefan (Post 1251592)
For the clientside-thing you can use player.attr[] which should work in most cases, although it's not directly sent to the other players via udp.

For global data we can use the irc-communication things right now (there are ways to verify from which server/script the data comes, although not fully documented). In the near future there will also be a way to send requesttext/sendtext messages to other npcservers, which then can be used to load, exchange and store data.

What about request/send text to other players?

When using IRC-Bot, we have to go into the same channel and send a message to everyone. If we sent to the player themselves, they get it as a PM.

Admins 12-09-2006 04:41 PM

You can also send irc messages and notices to individual users/scripts.

Tyhm 12-09-2006 09:45 PM

Quote:

Originally Posted by Stefan (Post 1251592)
For the clientside-thing you can use player.attr[] which should work in most cases, although it's not directly sent to the other players via udp.

For global data we can use the irc-communication things right now (there are ways to verify from which server/script the data comes, although not fully documented). In the near future there will also be a way to send requesttext/sendtext messages to other npcservers, which then can be used to load, exchange and store data.

Sweet....back to work on Hubworld for me, then. }:{D>


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

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