Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: TheJamsh on October 24, 2009, 11:01:11 AM

Title: what variables can be passed over a host-client connection?
Post by: TheJamsh on October 24, 2009, 11:01:11 AM
seeking a bit of outside help for the pack here... One of the new extra options pages lets you change vehicle list. Now these lists are radio buttons with variables assigned to them, but the variables are shell-based ones, NOT Ivars or SVars etc...

This is the Host CFG (not whole thing, just an example):

ConfigureVarSys()
{
CreateInteger("extraoptions.vehiclelist", 0);
SetIntegerRange("extraoptions.vehiclelist", 0, 16);
}

CreateControl("MPVehicles", "BUTTON")
{
ColorGroup("BLACKBLUE");
Geometry("TOP", "LEFT");
Position(0, 0);
Size(125, 0);
BorderSize(5);
BevelSize(3);
JustifyText("LEFT");
Style("ROLLOVER", "RADIO");
Font("TINY");
Text("Stock: MP Vehicles");
Cursor("Highlight");
useVar("extraoptions.vehiclelist");
value(1);

NotifyParent("Button::Select", "StockMPVehicles");
}

OnEvent("StockMPVehicles")
{
Cmd("network.session.svar4 mpvehicles.txt");
Cmd("network.session.ivar4 2147483647");
}


Now imagine that lower area many times over and arranged correctly to give multiple buttons. Below is the client version. No matter what i do, i CANT get the client version to read the same as whatever the host selects. It will always stay blank and not show which vehicle list has been selected. Do i HAVE to assign an svar to this to make it work correctly?


ConfigureVarSys()
{
CreateInteger("extraoptions.vehiclelist", 0);
SetIntegerRange("extraoptions.vehiclelist", 0, 16);
}


CreateControl("MPVehicles", "BUTTON")
{
ColorGroup("BLACKBLUE");
Geometry("TOP", "LEFT");
Position(0, 0);
Size(125, 0);
BorderSize(5);
BevelSize(3);
JustifyText("LEFT");
Style("ROLLOVER", "RADIO", "INERT");
Font("TINY");
Text("Stock: MP Vehicles");
Cursor("Highlight");
useVar("extraoptions.vehiclelist");
value(1);

NotifyParent("Button::Select", "StockMPVehicles");
}

OnEvent("StockMPVehicles")
{
Cmd("network.session.svar4 mpvehicles.txt");
Cmd("network.session.ivar4 2147483647");
}
Title: Re: what variables can be passed over a host-client connection?
Post by: TheJamsh on October 24, 2009, 11:02:14 AM
ive just noticed that the clients have the notify parent and onevent sections. Will erasing that make any difference. I assume its not-needed...
Title: Re: what variables can be passed over a host-client connection?
Post by: General BlackDragon on October 24, 2009, 01:46:35 PM
Radio buttons MUST have a var assigned to them, or last i checked, AV.

you can makeup an ivar up to 60 (? 65?) for your own stuff. Even if it's not used by DLL.
Title: Re: what variables can be passed over a host-client connection?
Post by: TheJamsh on October 24, 2009, 02:28:14 PM
Thought that was the case. So essentially the shell variable (even though it makes them work as radio buttons) is useless?

I can just pick one at random of course (so long as it isnt used)

Title: Re: what variables can be passed over a host-client connection?
Post by: General BlackDragon on October 24, 2009, 04:08:23 PM
No, it adds a min/max to radio buttons and allows the radio button to function (i.e. selecting option 1 makes option 1 stay lit up)

and yes, i believe 33 + are available.
Title: Re: what variables can be passed over a host-client connection?
Post by: TheJamsh on October 24, 2009, 04:21:02 PM
Well for something like this i guess i dont need the shell variable now then. Now to find an un-used stock variable...

Ivars go up to 64, svars go to 32 i believe. Ivar seems safer though
Title: Re: what variables can be passed over a host-client connection?
Post by: Nielk1 on October 24, 2009, 06:09:23 PM
Vars are not passed server to client if changed after launch anymore. That was cheating anyway.
Title: Re: what variables can be passed over a host-client connection?
Post by: TheJamsh on October 24, 2009, 07:26:47 PM
Thats fine, its for the pre-game shell so we needn't worry. It IS working now anyhow