Nexus Skirmisher
Nexus Modding => Scripting => Topic started by: Arparso on February 14, 2010, 22:16:34
-
Taking great screenshots in Nexus (maybe to promote your mod!?) is kinda hard, since there's no good way to remove the GUI... if you hide the GUI using GuiSelect(0), you lose camera control and the game can't be paused anymore, so I needed a workaround:
///////////////////////////////////////////////////////////////
// "Screenshot mode" (press CTRL+7 to remove GUI für 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
This only works in the editor, so don't even try it in the regular game. If you press CTRL+7 during gameplay, the GUI gets hidden and the game enters slow-motion mode, but only for two seconds. After that it returns to normal gameplay. So to get a great shot I wait for a good opportunity or arrange a screenshot-worthy scene myself, then pause the game to find a good camera position and press CTRL+7, when I'm ready to take the shot.
Might be handy for other modders so feel free to use this snippet (or modify it further to meet your individual needs). ;)
-
Wow... a command to slow time... Damn, I didn't know that one... World of better cinematics, here I come!
Thanks Arparso, that's a most invaluable tool you made there!
-
Okay, so I'm an idiot :)
How do you get this working? I tried adding it to the mission file but it doesn't seem to work at all.
-
Just add the snippet to the RULES section of your mission, like directly after your basic SceneInit RULE or in one of your MACHINES' STATEs (although the STATE has to be active for the "cheat" to work). I actually added this "cheat" to a separate file and add it to each mission using
#include "include_me.inc"
Then, in the mission editor, CTRL+7 should activate the slow-motion.
-
Yeah I don't know what I'm doing, but it doesn't work :p
-
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...
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
/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...
-
ahhhh yes, I was using the normal 7 key. Numpad 7 worked just fine :)
Thanks a lot, Arparso!