Username:    Password:    Remember Me?         

Reverie World Studios Forums - View Single Post - Screenshot Design Competition Round 3 - Lost City of X
View Single Post
  #10  
Old 02-08-2012, 10:24 AM
Brian Shingles's Avatar
Brian Shingles Brian Shingles is offline
Developer - Lua Coding
 
Join Date: Mar 2010
Location: Somewhere in England
Posts: 813
Brian Shingles is on a good road to success
Default

Look forward to seeing your map, Gongora.

To take a screenshot in the Editor, just use the Prnt Scrn button and paste into an image editing program or Play the scenario and use the F1 key.

If you play the scenario to take a screenshot, I recommend setting up a camera in Cinematic mode first (View->Cinematic mode). Use WASD and arrow keys to position the camera, press M to place the camera and enter a name e.g. Cam1

You will need to add in some scripting to switch the view to the camera and hide the GUI.

This is the code I use for when I want to take a screenshot from a scenario:
Code:
#include < Resource/Scripts/Map/SetupMap.fus >
Trigger.Cinematic=function ()	
	CurMap:BeginCinematic()
	HideGUI()
	CurMap:SetCamera(Objects.Cam1,90)
	--[[CameraTrackLoop_New(-20,
		{Objects.Cam1,80,
		Objects.Cam2,80,
		Objects.Cam3,80,
		Objects.Cam2,80,
		Objects.Cam1,80}
	)]]
	Trigger.Cinematic_Skip=true
	DisableSelf()
end

Trigger.Cinematic_End=function()
	Trigger.Cinematic_Skip=false
	CurMap:FadeOut(1)
	CurMap:EndDialog()
	CurMap:BlackOut()	
	Wait(1.25)
	CurMap:EndCinematic()
	CurMap:FadeIn(1)
	ShowGUI()
	
	DisableSelf()
end
Trigger.Cinematic_End=false

Trigger.Cinematic_Skip=function()
	if KeyPressed(" ") or KeyPressed("ENTER") or KeyPressed("ESC") then
		Trigger.Cinematic_End=true
		DisableSelf()
	end
end
Trigger.Cinematic_Skip=false
The code starts the scenario in cinematic mode, hides the GUI and switches to the camera set up earlier. Sometimes I use multiple cameras and loop through them using the code that is commented out. The code is also set up so that if you press space, Enter or Esc it will exit the cinematic and show the GUI again.

If you have units from multiple players and you don't want them to fight when you play the scenario, you'll need to set diplomacy.

Here's the code I use for diplomacy:
Code:
Trigger.Diplomacy=function ()
	-- Start off all neutral
	for i=0,8 do
		for j=0,8 do
			if i ~= j then
				Player[i]:SetStance(j,1)
			end
		end
	end
	DisableSelf()
end
To add in the code, in the Editor while in Edit mode (View->Edit mode, if you're in Cinematic mode), click on the Script button on the tool bar (looks like a cog). Create a new globals page (icon with a G), double-click on the new page in the list to it and paste in the code.

Hope this helps.

Last edited by Brian Shingles : 02-09-2012 at 08:22 AM.
Reply With Quote