A character is similar to an object, except that it can change rooms,
maintain its own inventory, and take part in conversations (more on
these later). It can also have its own custom animation speed and movement
speed.
Go to the "Characters" node in the main tree. You will see under it a
list of all the characters in the game.
To create a new character, right-click the "Characters" node and
choose the "New character" option.
You will see that there are a lot of options which you can set for each
character. The most immediately obvious one is the "Make this the player character"
button, which allows you to change which character the player will control
at the start of the game.
When the game starts, the first room loaded will be this character's
starting room.
The rest of the options are hidden away in the property grid on the right. Some
of them are described below:
The "UseRoomAreaScaling" option allows you to specify whether this
character will be stretched or shrunk in scaling areas of the screen. You might
want to disable this if you have a character who always stands still in the same
place, and you want the graphics on-screen to be the same size as you drew
them, even though he is standing on a scaled area.
The "Clickable" option tells AGS whether you want the player to be able
to click on the character. If Clickable is enabled, then the character will
be interactable, like the way things worked in Sierra games. If it is not
enabled then the character works like the main character did in Lucasarts games -
if you move the cursor over him or click to look, speak, etc, then the game will
ignore the character and respond to whatever is behind him.
To set which room this character starts in, change the "StartingRoom"
property. You can set the character's location within this room by using
the "StartX" and "StartY" properties to type in the X,Y co-ordinates you want him
to start at. These co-ordinates define where the middle of his feet will be placed.
The "NormalView" is where you set what the character looks like. You must
create a view in the View Editor, and this
view must have either 4 or 8 loops. If you use 4 loops, then when walking
diagonally the closest straight direction is used for the graphics. Each loop
is used for the character walking in one direction, as follows:
Loop 0 - walking down (towards screen)
Loop 1 - walking left
Loop 2 - walking right
Loop 3 - walking up (away from screen)
Loop 4 - walking diagonally down-right
Loop 5 - walking diagonally up-right
Loop 6 - walking diagonally down-left
Loop 7 - walking diagonally up-left
To change the rate at which the character animates, change the Animation Speed box.
Here, a smaller number means faster animation. Note that this does NOT
effect the speed at which the character actually moves when walking.
NOTE: The first frame in each loop is the standing still frame. When walking, the
game will cycle through the rest of the frames in the loop.
The "MovementSpeed" option allows you to control how fast the character moves when
walking. Here, a larger number means he walks faster. If you find that a movement
speed of 1 is still too fast, you can use negative numbers (eg. -3) which will move
even more slowly. The lower you go, the slower the movement speed.
The "SpeechColor" option specifies which colour is used for the text when
this character is talking. It effects all messages that are said by this
character. You can find out the colour for each number by going
to the "Colours" pane.
The "IdleView" option allows you to set an idle animation for the character.
To do this, create a new view, with one or more loops of the character idle
(eg. smoking, reading a book, etc). Then, set the "Idle view" to this view number.
If the player stands still for 20 seconds (you can change the timeout with
the Character.SetIdleView script function), then the current loop
from the idle view will be played.
The "ScriptName" property sets the name by which the character will be
referred to in scripts and in conversation scripting.
The difference from the RealName of the character is that the script name
may only contain letters A-Z and numbers 0-9 (the first character must be
a letter, however). The convention in AGS is that character script names
start with a lower case "c".
To set what happens when the player interacts with the character, click the
"Events" button (this is the lightning bolt button at the top of the property
grid). You will be presented with the events list; select an event and
press the "..." button to allow you to enter some script to handle the event.
You can also set a talking view for the character. To set one, use the
"SpeechView" property. If you set a talking view, then that view will be
used to animate the character while they are speaking. You should generally
have about 2-3 frames in each loop (the loops are used for
the same directions as in the main view).
There is also an available "Blinking view". This is used to play intermittent extra
animations while the character is talking. You may want to use this for effects
such as blinking (hence the name). If you set a view here, it will play intermittently
while the character talks (it is drawn on top of the normal talking view). The default
time between it playing is 3-4 seconds, but you can change this with the Character.BlinkInterval
script property.
NOTE: the blinking view is currently only supported with sierra-style speech.
"UseRoomAreaLighting" allows you to tell AGS whether this character will be
affected by light and tint levels set on room regions.
If you disable "TurnBeforeWalking", it will override the General Setting for
turning and tell AGS not to turn this particular character around on the
spot before they move.
"Diagonal loops" specifies that loops 4-8 of the character's view will be used for
the four diagonal directions. If this option is not enabled, the character will only
face 4 ways, and you can use loops 4-8 for other purposes.
"Adjust speed with scaling" modifies the character's walking speed in line with their
zoom level, as set on the walkable areas.
"Adjust volume with scaling" modifies the volume of any frame-linked sounds on the
character's view (eg. footstep sounds) with their zoom level, as set on the walkable areas.
"Solid" specifies that this character is solid and will block other characters from
walking through it. Note that both characters must be solid in order for them
to block one another.
AGS allows you to export your characters to a file, and then import the file into a
different game - so you can share the same main character between games, or
create one for distribution on the internet. Right-click on the character and
choose "Export character". The entire character setup and graphics will be exported
to the file, including the character's walking and talking animations.
To import the character into a different game, load it up, right-click the "Characters"
node and choose "Import Character". The file selector appears, where you find the CHA file which
you exported earlier. A new character slot will be created and all the settings imported.
NOTE: Because importing always creates a new slot, you cannot use it to
overwrite an existing character.
|