Username:    Password:    Remember Me?         

Reverie World Studios Forums - View Single Post - Any new information about the editor
View Single Post
Old 04-13-2011, 05:46 AM
Brian Shingles's Avatar
Brian Shingles Brian Shingles is offline
Developer - Lua Coding
Join Date: Mar 2010
Location: Somewhere in England
Posts: 817
Brian Shingles is on a good road to success

Those topics will be covered in more detail in the tutorials we put out once the Editor is released, so I will just briefly summarise a few things that have been mentioned elsewhere.

There was some discussion of Triggers on DOFH

Triggers are written in the Lua scripting language which is, in my opinion, one of the easiest languages to learn.

Custom skills/spells can be created through triggering and you can do things such as summon units, fire projectiles or damage units in an area with a visual FX.

Custom units (i.e new models) is more a modding thing, but from the Editor you can change a unit's stats, name, scale, etc.

You can tell a unit to perform a particular animation available to it using the Perform function.

Cut scenes are fairly simple to make. In the Editor switch from Edit Mode to Cinematic mode. Use WASD and arrow keys to position the view you want. Press m to place a Camera Marker, type in a ScriptName for the camera when prompted. Repeat until you have enough cameras. Return to Edit Mode and create a trigger to use these cameras.

Here is an example of the code needed for a simple cut scene where a Guard welcomes you to a town when you move your Hero close enough:
local choice
	if Objects.Hero:DistanceTo(Objects.Guard)<256 then		-- Only do this once the Hero is close enough to the Guard
		CurMap:FadeOut(0.75)		-- Fade to black
		Objects.Hero:Idle()		-- Make the Hero go Idle
		CurMap:BeginCinematic()		-- Start cinematic mode
		CameraTrackLoop_New(-20,{Objects.GuardCam1,80,Objects.GuardCam2,80,Objects.GuardCam1,80})	-- Set up a simple 20sec loop, cameras zoomed in to 80% using camera marker objects you named GuardCam1 and GuardCam2
		Objects.Guard:Perform(32,20,-1)		-- Tell the guard to perform his talking animation
		choice = CurMap:PlayChoiceDialog(1,nil,"GUARD: Welcome to our town, stranger",nil,"- Thank You","- Bugger off")		-- Save the player's choice of response to the Guard's dialogue for use later
		CameraTrackLoop_Stop()		-- Stop the cameras from looping
		CurMap:EndCinematic()		-- Exit cinematic mode
If you don't want a looping camera, you can set either a static camera or a moving camera
MoveCamera will move from the current camera position to the camera object you specify, so it is often best to set a static camera beforehand.