jonjons
Member
hello
i have this code... This var savImg_IndexHold = image_index; catches to current image_index number and returns it later once saving is false.
Problem is, it keeps increasing the image index number by 1, with 2 or 3 mouse button clicks.
Ive tried round(image_index ), floor(image_index ), but the result is always the same after 2 or 3 mouse clicks, the image_index increses +1 until it reaches the last number.
Any idea why this is happening ?
i have this code... This var savImg_IndexHold = image_index; catches to current image_index number and returns it later once saving is false.
Problem is, it keeps increasing the image index number by 1, with 2 or 3 mouse button clicks.
GML:
//--create event
isSave = false;
savImg_IndexHold = 0;
imgSpeed = 0;
image_speed = imgSpeed;
GML:
//--DRAW-GUI-EVENT
if ( mouse_check_button_pressed(mb_left))
{
savImg_IndexHold = image_index;
isSave = ! isSave;
image_index = 0;
imgSpeed = 0;
}
GML:
//--STEP EVENT
if ( isSave == true )
{
imgSpeed = 25;
saveAnim2();
if (image_index >= image_number - 0.5)
{
isSave = false;
imgSpeed = 0;
image_index = savImg_IndexHold;
}
}
Ive tried round(image_index ), floor(image_index ), but the result is always the same after 2 or 3 mouse clicks, the image_index increses +1 until it reaches the last number.
Any idea why this is happening ?