Hide mouse cursor,,, Question

Started by Stasko, Mon 18/06/2007 16:34:39

Previous topic - Next topic

Stasko

I have searched everywere on the forums and looked in the manual, ALso i wanna say the manual and these forums are realy great! thhey are very very helpfull for help! But enough about that :P

I am making an intro for my game, i am learning every day more and every day this program is more fun too use!
But how can i let the mouse cursor hide for several scenes of my intro?

I tried in the room script "hidemousecursor'' but it gave an error,, hopefully someone can give me a little explaination about hiding the mouse cursor
:)

Gilbert

It's HideMouseCursor(), the function names are case sensitive, also since it's functipon call you can't leave out the parathesis ().

However, as of V2.7, it's not recommended to use the old style function HideMouseCursor() anymore, better use:
mouse.Visible = false;

Stasko

OK great!

I wil try it out! but i have too use the code for each room again i suppose?
But doesnt mather, i wil see it within a minute thanks.

Stasko

He is giving an error when i write this down.

// room script file
mouse.Visible = false;

What am i doing wrong?  :o

Khris

#4
You can't put commands like that directly into the room script, they have to go inside a function.
For what you want to achieve, go to the room's interactions (in the Room -> Settings pane, click the red lowercase "i"), create a new RunScript-action in "player enters screen (before fadein)", click the "Edit script" button and put the command into the window that's gonna open.
Now close the windows.

If you click the {}-button you can see that adding a RunScript-action added a function to the room script; the code you've put in the window actually went inside that function.

This is the procedure for everything you want to happen inside the game; think, when or caused by what you want things to happen, then put the code in the appropriate function.

Ashen

Khris' answer is correct - but in future please say WHAT THE ERROR SAID. Just telling us there was an error really doesn't help with figuring out how to solve it, except in obvious cases like this. (I'd guess it was an 'parse error: unexpected ...' one, as dealt with in the BFAQ.)
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk