Y
Yumeito
Guest
Hi,
This is my very first original project. I'm making an Android game(haven't purchased pro/module yet but will do it as soon as I have successfully completed this games prototype) and wish to complete(full game) it by October. But since I'm a newbie this EPIC game idea that I have in mind and been working on for a couple of weeks now has proven to be EXTREMELY CHALLENGING. I really want to make this game see the light of day.
So now here's my problem.
1)
When I move the instance over others after I spawn them into the room some of them appear below the others. All the dominosthat are spawned into the room has got exactly the same properties too but this still happens and it will affect my game. Check out this video to see what I'm talking about.
It appears that obj_front is always in front of all the other dominos even though all of them has the depth set to 0. here's a small part of the scr_moving_dominos that is responsible for the mouse movement.
In the above code it starts of with obj_front which is the domino with the white dot in front as seen in the video. And the others are all separated by an else if . I have only shown the else if for obj_back and it's the same for all the others in the video. There is no code in any of the domino objects. They all have one parent and it's called obj_domino_controller and this is its step event .
Could anyone tell me why some of the dominos appear on top of another? I think the problem is in the scr_moving_dominos. If you think there's nothing wrong here I'll post the code that is inside the buttons that spawn the dominos as well.
2)
Problem 2 is actually a continuation of problem #1. As you have already seen(from the above video) that not only that the dominos appear below some others but when I go through others my controls move to the domino that is over me. I don't know if I worded that right. But please watch the video - it's the same one above, you'll understand. Please tell me how to fix this.
3)
Problem 3 is completely different from the above two and it is about controlling/moving the dominos with those on screen arrows. As I have already said my end goal is an Android game...so I need these arrows to work. Here's what all I have tried so far and all have failed...
Thank you for your help in advance.
This is my very first original project. I'm making an Android game(haven't purchased pro/module yet but will do it as soon as I have successfully completed this games prototype) and wish to complete(full game) it by October. But since I'm a newbie this EPIC game idea that I have in mind and been working on for a couple of weeks now has proven to be EXTREMELY CHALLENGING. I really want to make this game see the light of day.
So now here's my problem.
1)
When I move the instance over others after I spawn them into the room some of them appear below the others. All the dominosthat are spawned into the room has got exactly the same properties too but this still happens and it will affect my game. Check out this video to see what I'm talking about.
It appears that obj_front is always in front of all the other dominos even though all of them has the depth set to 0. here's a small part of the scr_moving_dominos that is responsible for the mouse movement.
Code:
if(instance_position(mouse_x, mouse_y, obj_front))
{
with(instance_position(mouse_x, mouse_y, obj_front))
{
//Move the dominos with mouse.
x = mouse_x;
y = mouse_y;
//Enlarge dominos
scr_size_changer();
}
}
else if(instance_position(mouse_x, mouse_y, obj_back))
{
with(instance_position(mouse_x, mouse_y, obj_back))
{
//Move the dominos with mouse.
x = mouse_x;
y = mouse_y;
//Enlarge dominos
scr_size_changer();
}
}
Code:
///Controls the dominos
x = clamp(x, 15, 525);
y = clamp(y, 20, 610);
//Moving dominos
if(mouse_check_button(mb_left))
{
scr_moving_dominos();
}
else
{
image_xscale = 1;
image_yscale = 1;
}
2)
Problem 2 is actually a continuation of problem #1. As you have already seen(from the above video) that not only that the dominos appear below some others but when I go through others my controls move to the domino that is over me. I don't know if I worded that right. But please watch the video - it's the same one above, you'll understand. Please tell me how to fix this.
3)
Problem 3 is completely different from the above two and it is about controlling/moving the dominos with those on screen arrows. As I have already said my end goal is an Android game...so I need these arrows to work. Here's what all I have tried so far and all have failed...
- First I tried commenting out the the code in the obj_domino_controller (where the scr_moving_dominos is called). And then I added the following to the step event of the obj_arrow_up :
Code:///Moving dominos when pressed if(point_in_rectangle(mouse_x, mouse_y, 387, 657, 450, 721)) { if(mouse_check_button_pressed(mb_left)) { if(instance_exists(obj_front)) { with(obj_front) { y = -5; break; } } } }
- I think I need to use the function move_towards_point or move_snap here...but I can't figure how to implement them...
Thank you for your help in advance.
Last edited by a moderator: