Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001706Zandronum[All Projects] Suggestionpublic2014-02-13 16:502014-07-29 13:30
Reporteribm5155 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusnewResolutionopen 
PlatformX64OS8.1OS VersionXP/Vista/7
Product Version2.0-beta 
Target VersionFixed in Version 
Summary0001706: client side global variable
DescriptionWith this, it would be able to have a certain global variable that would have the same values into serverside and clientside.

So if the server change the data that was into a clientside global var, it would update the clientside global var too.

And people who makes use of clientside scripts sometimes want to use serverside data to make print some texts(would save alot of data traffic) or even some effects, so it would make the scripts much more easy to be done (instead to update each clientside data with acs_execute(x,0,data1,data2,data2))

Mods that may would have use of it:
-Who Dun It (storing who is the murder for print the blood bar, and for printing with a 'X' where the last humans are on screen)
-Flappy Lost Soul(clientside messages and clientside player list)
-other mods that uses clientside menus, alot of prints and specific player effects...
Steps To Reproduceex: on a multiplayer game.

int data=1 clientside;


script 1 open{
 while(data<10000){
 data=data*2
 delay(35);
 }
}

script 2 open clientside{
 while(true){
 print(d:data);
 delay(1);
 }
}
print outup:"1" "2" "4" "8" "16" "32" "64" "128" "256" "512" "1024" "2048",...
output without data being clientside:"1" "1" "1" "1" "1" "1" "1"
Additional InformationbarraI hope people understood what did I wrote, if not I can rewrite it :)
Attached Files

- Relationships

-  Notes
User avatar (0008528)
ibm5155 (reporter)
2014-04-09 19:43

what about a tag like global?
if a var would receive this flag, it would have synchronized values betw server and client.
ex:
global int total_imps;
User avatar (0009442)
Watermelon (developer)
2014-06-15 16:10

Why can't you pass them to the client via script puking?

SERVER -> CLIENTSIDE (-> CLIENTSIDE NET) which sets it?
User avatar (0009536)
ibm5155 (reporter)
2014-06-17 02:23

well the only way I know to pass serverside data to clientside is by acs execute, but, you can only pass 3 arguments on a single call...

And like on my last mods/maps I had to transfer more than 30 arguments D:

I was having two solutions
1)use one argument to control what var should be update ex:
acs_execute(1,1,5,4);
script 1(int control, int a, int b){
 switch(control){
 case 1:
  data[0]=a;
  data[1]=b];
...
}

2) make alot of scripts just to tranfer data

Well, I just wanted a way where people wouldn't be require to use that weird methods, and you need to make controls for it D:.

I actually use alot clientside to print strings, since it actually eat alot of internet data, so instead of a server side loop printing "murder:name" you just send the number of the murder to client...

If there's another easier way to make it pls tell me D:
User avatar (0010069)
Watermelon (developer)
2014-07-29 03:30
edited on: 2014-07-29 03:31

You'll have to pass 30 ACS calls, it's annoying... I know.


ACS_Exceute the script number, and pass a constant and the index shifted together so it uses up one slot. If you know your numbers are n bits long, you could try to fit multiple numbers into one arg by using them as a bit field.

Otherwise, 30 ACS executes it is ;)

User avatar (0010083)
ZzZombo (reporter)
2014-07-29 13:30

Another method is to use dummy actors, and use some their properties as values, like the speed of MyDummy is the count of all players deaths.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2014-02-13 16:50 ibm5155 New Issue
2014-04-09 19:43 ibm5155 Note Added: 0008528
2014-06-15 16:10 Watermelon Note Added: 0009442
2014-06-15 16:10 Watermelon Status new => feedback
2014-06-17 02:23 ibm5155 Note Added: 0009536
2014-06-17 02:23 ibm5155 Status feedback => new
2014-07-29 03:30 Watermelon Note Added: 0010069
2014-07-29 03:31 Watermelon Note Edited: 0010069 View Revisions
2014-07-29 13:30 ZzZombo Note Added: 0010083






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker