Game Speed Sliders

Started by Ytterbium, Mon 26/01/2004 20:54:21

Previous topic - Next topic

Ytterbium

I'm completely clueless as to how I should make one. Does anyone know?

Currently in production: Septigon

strazer

#1
It's quite easy in fact.

Just put a GUI Slider object on a gui, set it's min and max values (default game speed is 40), maybe min 10 max 70.

Then add to your interface_click function:

...
if (interface == 3) {  // gui the slider is on
  if (button == 0) SetGameSpeed(GetSliderValue(3,0)); // on left mouse click; 3=number of gui, 0=number of slider
}
...

Chris

Ytterbium

Thank you. I appreciate it.

Currently in production: Septigon

SMF spam blocked by CleanTalk