Hello again!
I've solved the problem, so I'm going to share the script:
The Mouse Button Down and Up events have not changed, but many changes in the OnDraw!
- Code: Select all
if(slidemarkvar == 2)
{
if(slidermark.x > 51)
{
slidermark.x = 51;
}
if(slidermark.x < -123)
{
slidermark.x = -123;
}
FollowMouse("slidermark", X_AXIS);
if(x > -123 && x < -109)
{
slidermark.x = -123;
choosen_number.textNumber = 2;
}
if(x > -108 && x < -80)
{
slidermark.x = -94;
choosen_number.textNumber = 3;
}
if(x > -79 && x < -51)
{
slidermark.x = -65;
choosen_number.textNumber = 4;
}
if(x > -50 && x < -22)
{
slidermark.x = -36;
choosen_number.textNumber = 5;
}
if(x > -21 && x < 8)
{
slidermark.x = -7;
choosen_number.textNumber = 6;
}
if(x > 7 && x < 37)
{
slidermark.x = 22;
choosen_number.textNumber = 7;
}
if(x > 36 && x < 51)
{
slidermark.x = 51;
choosen_number.textNumber = 8;
}
}
if(slidemarkvar != 2)
{
slidermark.x = slidermark.xprevious;
}
First if statement accures when the mouse-button is held down. It will follow the mouse, but if the marker wants to go too far, it will be set back to the end of the slider. The rest of the if statement tells the marker to go to specific places if within a small range of them, and then set the choosen number to the defined value, which is the choosen number of players.
But what happens if you release

Notice the last if statement in that code (below too):
- Code: Select all
if(slidemarkvar != 2)
{
slidermark.x = slidermark.xprevious;
}
This keeps the slider in place even when the mousebutton is released. (This if statement was which I was complicating SO much, when the answer was SO simple!

)