L
Leon Hurley
Guest
I'm in the very early stages of a simple strategy game which involves picking up things with the mouse to move them. At some point the object/mouse tracking seemed to break unless you moved slowly but I couldn't understand why as that's pretty much day one code I've not touched since. I've rebuilt the project from the last working version 6 or 7 times now and each time I 'fixed' it, the same problem occurred.
I've since discovered that organising my objects into folders somehow breaks the game. After a lot of experimentation creating folders and moving objects one at a time I've narrowed it down to the mouse object - if put that in a folder, it breaks the game. The only code in the mouse object is this in the Step event:
x = mouse_x
y = mouse_y
If I take the mouse object out of the folder, it sometimes fixes the problem but not always - I've versions of the game that seem to be permanently broken even if you delete every single folder, and other versions that work when you take the mouse object out of the folder. I've also found that if I delete the mouse object and recreate it from scratch - new object, same name, same sprite, same code - the game starts working again.
Literally no idea what to do here. Obviously leaving the mouse object out of a folder is the immediate fix but something is obviously very wrong.
[UPDATE] Simply moving the mouse pointer in the Object hierarchy breaks the game. Just moved it out of the way because it was annoying me in the middle and got the same game breaking effect. Had to delete it and recreate a new one to get the game working.
I've since discovered that organising my objects into folders somehow breaks the game. After a lot of experimentation creating folders and moving objects one at a time I've narrowed it down to the mouse object - if put that in a folder, it breaks the game. The only code in the mouse object is this in the Step event:
x = mouse_x
y = mouse_y
If I take the mouse object out of the folder, it sometimes fixes the problem but not always - I've versions of the game that seem to be permanently broken even if you delete every single folder, and other versions that work when you take the mouse object out of the folder. I've also found that if I delete the mouse object and recreate it from scratch - new object, same name, same sprite, same code - the game starts working again.
Literally no idea what to do here. Obviously leaving the mouse object out of a folder is the immediate fix but something is obviously very wrong.
[UPDATE] Simply moving the mouse pointer in the Object hierarchy breaks the game. Just moved it out of the way because it was annoying me in the middle and got the same game breaking effect. Had to delete it and recreate a new one to get the game working.
Last edited by a moderator: