Brenden
Member
So I am making a Roulette game just for fun but i'm have an issue with one of my codes.
I have gone though it and debugged it and I found the main issue is this code which is on my obj_holding global left mouse button pressed.
With this code I have a variable mouse_on[1-5] in my obj_chip and it is an array. Every other code goes though just fine but the variable h wont change when I make mouse_on true through this code on my obj_chip step event. ( var chip is a creation code for each chip which varys from 1 to 5)
I don't know if you are aloud to do what I am doing but if you have any smart advice it would be of great help!
If you need any other details just comment.
I have gone though it and debugged it and I found the main issue is this code which is on my obj_holding global left mouse button pressed.
Code:
if (obj_chip.mouse_on[1]){
h=1
}
if (obj_chip.mouse_on[2]){
h=2
}
if (obj_chip.mouse_on[3]){
h=3
}
if (obj_chip.mouse_on[4]){
h=4
}
if (obj_chip.mouse_on[5]){
h=5
}
Code:
if (mouse_x >= x-24 && mouse_x <= x+24 && mouse_y >= y-24 && mouse_y <= y+24){
mouse_on[chip]=true;
}else{
mouse_on[chip]=false;
}
If you need any other details just comment.