yvodlyn
Member
Hello everyone again, I'm sorry for my questions.
I created touch control with mouse input in game maker. when a test the game on my android phone, and when my first finger touch the screen, I can control the player one and when I touch the screen with the second finger, I can control the other player. But when I release the first finger, I can't control the second player. So To control the second player, I need to control the first player before. What I want, is to control the second player with controlling the first one.
to help me, here the code:
For the first player:
/// position with mouse
if device_mouse_x(0){
if(device_mouse_x(0) > 512){
y = clamp(device_mouse_y(0), 140, 702);
}
}
For the second player:
/// position with mouse
if device_mouse_x(1){
if(device_mouse_x(1) < 512){
y = clamp(device_mouse_y(1), 140, 702);
}
}
thxt for your help!!!!
I created touch control with mouse input in game maker. when a test the game on my android phone, and when my first finger touch the screen, I can control the player one and when I touch the screen with the second finger, I can control the other player. But when I release the first finger, I can't control the second player. So To control the second player, I need to control the first player before. What I want, is to control the second player with controlling the first one.
to help me, here the code:
For the first player:
/// position with mouse
if device_mouse_x(0){
if(device_mouse_x(0) > 512){
y = clamp(device_mouse_y(0), 140, 702);
}
}
For the second player:
/// position with mouse
if device_mouse_x(1){
if(device_mouse_x(1) < 512){
y = clamp(device_mouse_y(1), 140, 702);
}
}
thxt for your help!!!!