![]() picks up the object), and then move the mouse to another location. ![]() It's late and I programmed all night so sorry if I didn't searched enought but I think it's more clever to juste ask for help while I'm resting a bit. By updating an objects position each frame using the position calculated by this. I've tried somethings likeĭisplay_mouse_set(x + window_get_x(), etc.) and it didn't work. So, to elaborate, to make any object face anything else, you would find the direction from said objects position (x, y) to the position of what youre looking. It's like game makers thinks that my game is being played on the bottom right part of my screen but in a much grater scale. To better refine my question Im trying to have my 'objplayership' move just up and down in relation to the mouse, so if Im moving my mouse up or down the objplayership' will follow towards the mouse either up or down. My mouse gets lost near the bottom right corner of the screen. 'direction mousex' 'speed 1 ' but the movement looks weird and does not do what I am trying to do. The problem is not that it doesn't work but it throws the cursor very far away from the games window, outside of my screen, but it still relative of the instance's position (If the instance is more to the right, the mouse will be throwned far away and a little bit to the right). event then it will be run, regardless of the position of the mouse within the. Variable "state.dashing" is from an enum. A mouse event is something that happens when the user does something. If state = state dashing display_mouse_set(x,y) Following the code, the mouse should juste "follow" the instance that runs the code. I've recently tried for the first time to force mouse position by using some keys on the keyboard.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |