Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: TheJamsh on September 13, 2009, 12:33:35 PM

Title: capping values for sliders?
Post by: TheJamsh on September 13, 2009, 12:33:35 PM
I need to limit the values for a slider for a new gamemode from 1-15 (number of rounds).

How can i limit the slider? Its related to a variable (ivar61), but i don't know where i can set its limits. SetIntergerRange doesnt work.
Title: Re: capping values for sliders?
Post by: TheJamsh on September 13, 2009, 12:43:19 PM
Also, WHY isn't this value being capped if i enter something higher or lower?


      CreateControl("MaxRoundsEdit", "EDIT")
      {
         ColorGroup("BLACKBLUE");
         Geometry("LEFT", "TOP");
         Position(200, 0);
         Size(19, 9);
         BorderSize(3);
         BevelSize(3);
         JustifyText("RIGHT");
         Font("TINY");
         Style("ROLLOVER", "OUTLINE");
         Cursor("Highlight");
         UseVar("network.session.ivar61");
         SetIntegerRange("network.session.ivar61", 1, 15);
      }
Title: Re: capping values for sliders?
Post by: General BlackDragon on September 13, 2009, 07:30:19 PM
the map ini can set boundries.
Title: Re: capping values for sliders?
Post by: TheJamsh on September 14, 2009, 01:43:47 PM
it CAN :O? How you do that...?
Title: Re: capping values for sliders?
Post by: General BlackDragon on September 14, 2009, 09:50:59 PM

- Feature add. In MP map .inf files, for all ivars except for #4 and 6
(bitfields), and 63 (launch flag), added:

[NetVars]
ivar0Min .. ivar62Min = 0
ivar0Max .. ivar62Max = 9999999

   Note: you must specify both the min & max entries for it to be
used.  Trying to set ranges from .cfg files isn't going to work
because I override things in code. #9, 25 (strat only), 26, and 27 may
still be overridden by code. [NM]
Title: Re: capping values for sliders?
Post by: TheJamsh on September 15, 2009, 07:19:26 AM
YUS! thankyou GBD :D