The script above locks the menu, preventing it from turning on again. You may want to remove this, or have it unlock when the mouse position is correct - it depends on the exact behaviour you want.
ok, so still having trouble with this, how does screen position work, what f would cover the bottom top third of the screen for example? so if mouseposition goes into the top half?
Comments
If you want it to be based on height, yes.
The script above locks the menu, preventing it from turning on again. You may want to remove this, or have it unlock when the mouse position is correct - it depends on the exact behaviour you want.
ok, so still having trouble with this, how does screen position work, what f would cover the bottom top third of the screen for example? so if mouseposition goes into the top half?
See Unity's docs on Input.mousePosition for details on what the y value represents.
A check to determine if the mouse is in the upper third of the screen would be:
is there a way to run an action list from this script also? Found here:
https://www.dropbox.com/sh/9qyn2p9nx08sntv/AADRc85S-Fr9OYtfaz1CQq3Za?dl=0
An ActionList can be run through script by calling its Interact function.
Thanks, what is correct scripting to check if a global variable is true please?
See the Manual's "Variable scripting" chapter:
thanks, how do i implement into this script so that:
when inventory open true
cursor detect 2/3 screen and close inventory
if inventory open false
cursor do not detect anything
here is the script:
Marvellous!