Hello,
somehow I lost the control in my game, but cant find out why.
In my game, when the intro starts the mouse cursor gets hidden via code, but after the intro is played, the mouse cursor is still hidden, I can move it but no clicks are "registered".
When I hover the invisble cursor over the verbs, the verbs are highlighted, but I also cant click on them.
If I spawn directly into this room, via character starting room, the mouse cursor is visible and the gamecontrols work as intended. The problem only occurs when I run the game from start, with several rooms before this, as the game intro.
The intro-code is always in "room_FirstLoad" and it contains a mouse.visible = true; at the end, but its still invisible and has no effects on any clicks everywhere
Is there some other commands to get controls back? Some mistake I might have put in that prevents this?
mouse clicks suddenly not registering is usually a forgotten big clickable GUI or GUI Button that is now in the way, I would check for that.
Now, to the mouse not showing, does it have a sprite graphic? I would make sure all modes of the mouse you have in the editor have a graphic set to them.
Quote from: chip on Sun 29/05/2022 15:19:13
If I spawn directly into this room, via character starting room, the mouse cursor is visible and the gamecontrols work as intended. The problem only occurs when I run the game from start, with several rooms before this, as the game intro.
The intro-code is always in "room_FirstLoad" and it contains a mouse.visible = true; at the end, but its still invisible and has no effects on any clicks everywhere
First thing always is to make sure the function is run. Double check that the room_FirstLoad is actually connected to the corresponding event in room properties. You may also put "Display("hello")" there and see if message appears.
thank you for your feedback
@eri0o
i think that gui you mentioned could be the problem, i will look into it
in the project explorer every cursor has a graphic added, i cant remember that Ive changed something there
@Crimson Wizard
i am sure the code in room_Firstload is running, because the intro is "played", and its all in there
will look further into there
best regards
Can you post the code from room_Firstload?
Hello, the problem is solved, it was not caused by the code in the room_firstload
Like eri0o mentioned, it was caused by a gui, that was faded to transparent in another room, that was used before this specific room
The gui was invisible but still there, blocking the mouse input I think.
A gui.Visible = false; added to the end of fadeout-code fixed the problem.
Thank you all for your help