Matty10k Posted June 11, 2020 Share Posted June 11, 2020 Scripting - Enabling / Disabling Cursor How To By Matty [NEEDED PROGRAM] https://github.com/0xd4d/dnSpy/releases Once you are on that page, Locate to the file that has the exact name and click on it and download it. Steps Step 1 Extract the Download of dnSpy, Right click the file and press Extract Here Step 2 Open dnSpy by locating to "dnSpy.exe" Step 3 Once dnSpy is open, Locate to the tab that says File, Click Open and Locate your Flashing Lights Folder > flashinglights_data > Managed > and Select "Assembly-CSharp.dll" Step 4 Click on the Arrow on the Left hand side on the Assembly-CSharp Click the same arrow on this Locate and Find "UnityEngine.PostProcessing" Step 5 In the UnityEngine.PostProcessing tab, Locate "PostProcessingBehaviour" Open PostProcessingBehaviour (Should look like this, ) Step 6 Scroll Down in the tab on the right hand side and locate OnGui (Photo Attached) Right Click in any area on the private void OnGui and Click Edit Method(C#) Step 7 Type Enter after the '{' and Paste in this " if (Input.GetKeyDown("right alt")) { Cursor.visible = true; Screen.lockCursor = false; } if (Input.GetKeyDown("left alt")){ Cursor.visible = false; Screen.lockCursor = true; } " Your Screen should now look like this. Press Compile and Press "Ctrl + Shift + S" and press ok and close dnSpy Step 8 Load up Flashing Lights and go start a game up and select a role and you should now be able to enable the cursor by pressing "right alt" and disabling it by doing "left alt". Questions Why is this useful? This "Script" if you want to call it that is useful for when FLModders Modding Team releases more scripts that include Mod Menus Etc. If you have any more questions, Feel free to ask me on discord, Matty#1281 or join the Flashing Lights Modders Official Discord! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now