Nexus Modding > Scripting

Code Snippet: "Screenshot mode"

<< < (2/2)

Arparso:
That's strange... well, try out this:

Create a new .mission file, paste this code into it and replace the DefLocation to some valid location in your mod (not at home, can't look for one myself right now). Now open up the mission editor and start the mission. When hitting CTRL+7, it should successfully remove the GUI and enter slow-mo mode for about 5 seconds. If that doesn't work, then I'll be damned...


--- Code: ---MISSION Basic
Name "Basic"

DefLocation "XXXXXXXXXXX"

OBJECTIVES
1       "Destroy all enemies"
END

RULES

RULE event SceneInit
:action
Debug("#####################");
Debug("## Mission Start");
               
SelectEx(s.ship,
MakeFullyKnown(S.this);
FreezeReconState(S.this,1);
);
:end
END
       
///////////////////////////////////////////////////////////////
// "Screenshot mode" (press CTRL+7 to remove GUI for 2 seconds)

RULE event Cheat7
:action
GuiSelect(0);
SetMotionFactor(0.1);
Timer(RestoreGuiAndMotion, 0.2, 0);
:end
END

RULE event RestoreGuiAndMotion
:action
GuiSelect(3);
SetMotionFactor(1);
:end
END
       
END

--- End code ---

/edit:
Thinking about it... are you pressing 7 on the numpad or the "regular" 7? I'm using the numpad, but actually I'm not sure about the regular 7 key...

jstubbles:
ahhhh yes, I was using the normal 7 key. Numpad 7 worked just fine :)

Thanks a lot, Arparso!

Navigation

[0] Message Index

[*] Previous page

Go to full version