UFO-Scripts/seq *.ufo

From UFO:AI
< UFO-Scripts
Revision as of 18:51, 2 June 2012 by Bayo (talk | contribs) (* rename 2dobj -> obj2d)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A sequence is a cinematic using the game engine to render 3D models, image, text, sounds, and music. It can be displayed in fullscreen, or as a part or the GUI.

With this type of UFO-script we can make your own sequences. Have a look at the base/ufos/seq_*.ufo for more examples.

precache [model|pics]

  • .. for models as parameter: pathnames relative from base-folder
  • .. for pics as parameter: pathnames relative from base/pics-folder
  • .. (string) filenames for models/pics

Example

precache models
{
	"models/civilians/male/body01"
	"models/civilians/male/head01"
}
precache pics
{
	ufoai
}

camera NAME

moving
value for zooming
where does it start?
rotation

Example

camera cam1
{
	zoom	1.0
	angles	"30 225 0"
	dist	100
}

obj2d NAME

the translateable text
x, y (normalized to 1024x768 resolution)
ur, ul, uc, ...
The RGBA value for the obj2d
RGBA
speed in two directions (x,y)
will be placed relative to previous element - useful if you use translateable text and don't know for sure how many lines the translated text uses
value used for scaling the obj2d
the RGBA value for the background color
the font that should be used to display the text (see font definitions)
the image path - relative to base/pics
If true, the engine render the object before the 3D models. Default value is false.

Example

obj2d herby_text
{
	text	"Code, Visual Effects"
	pos	"974 50"
	align	ur
	color	"0 1 0 0"
	fade	"0 0 0 1"
}

model NAME

see anm-file for model
skinnumber
parent model (e.g. head and body) (at head: name of the body-model)
speed in all three directions (x,y,z)
moving
where does it start?
rotation

Example

model herby_body
{
	model	models/civilians/male/body01.md2
	skin	2
	anim	walk0
	origin	"-277.5 0 0"
	speed	"60 0 0"
}
model herby_head
{
	model	models/civilians/male/head01.md2
	parent	herby_body
	tag	tag_head
}

General commands

value of seconds to wait
command to execute
remove a ressource - string is the NAME of the ressource to remove
set the speed used for animation of models. The default value is 1000 milliseconds. A smaller value will set a slower animation.
  • click
Will halt the sequence execution until the user clicked a mouse button
  • sound NAME
NAME is a soundfile relative to the sounds directory.
  • music NAME
NAME is a musicfile relative to the music directory.

Example

wait 0.2
delete herby_body
delete herby_head
delete herby_text

Example

sequence intro
{
	music mission
	animspeed 100

	obj2d i_sentence1
	{
		text	"_intro_sentence1"
		pos		"512 485"		align	uc
		color	"0 1 0 1"
		speed	"0 -30"
		relative	true
	}
	obj2d i_sentence2
	{
		text	"_intro_sentence2"
		pos		"512 510"		align	uc
		color	"0 1 0 1"
		speed	"0 -30"
		relative	true
	}
	obj2d i_sentence3
	{
		text	"_intro_sentence3"
		pos		"512 535"		align	uc
		color	"0 1 0 1"
		speed	"0 -30"
		relative	true
	}
	obj2d i_sentence4
	{
		text	"_intro_sentence4"
		pos		"512 560"		align	uc
		color	"0 1 0 1"
		speed	"0 -30"
		relative	true
	}
	obj2d i_sentence5
	{
		text	"_intro_sentence5"
		pos		"512 585"		align	uc
		color	"0 1 0 1"
		speed	"0 -30"
		relative	true
	}
	wait 200.0

	delete i_sentence1
	delete i_sentence2
	delete i_sentence3
	delete i_sentence4
	delete i_sentence5
}

Tool

The command seq_start allow to display a random sequence in fullscreen.

Open the console and type:

seq_start NAME_OF_THE_SEQUENCE