Animals_Pigeon
Description
Pigeon. This sentient has "enemy" AI set by default (global/enemy.scr) in which its AI states are defined and the sentient type is set as "enemy". However, since the default AI is totally inadequate for this kind of sentient (this has to be a screwup), it will act as a completely static model in the game unless custom AI is defined for it in a script. See notes below.
Keys
|
angle:
|
initial orientation of model in game (default: 0).
|
model:
|
name of entity's model definition file (pigeon.def). Do not change.
|
anim:
|
default "Idle" animation alias name of model. Points to a .sam animation file in the model's .def file. See Notes below.
|
scale:
|
controls size of model in the game (ex: 1.0).
|
targetname:
|
name referred to when controlled by a script.
|
alpha:
|
translucency of model in game. Values are from 0-1 (default: 1).
|
|
Spawnflags
|
None
|
Notes
The anim key cannot be used directly to change the model's initial animation in the game. A script with animation commands (anim, nextanim, animate, etc.) must be used for this. In the case where the sentient or actor has default AI states set, it might be necessary to use simple AI commands (ignore, ignoreall, respondto, definestate, etc.) to "desensitize" it to some or all game events (sounds, enemy sighting, etc.) before it can respond to animation commands without interference from its own AI.
However, changing the value of the anim key in SinEd by using the + and - buttons in the entity dialog and using the "Toggle animations" feature (CTRL-A) can be useful for browsing the model's different animations directly in the 3D view. This information can then be used to set the animation commands in the script to the desired animations.
Here is a simple script that can be used to give pigeons the necessary AI to make them fly around and gib when killed:
$pigeon1 thread pigeons_come_to_life
$pigeon2 thread pigeons_come_to_life
|
etc...
|
end
pigeons_come_to_life:
local.self animal
local.self fly
local.self noland
local.self health 15
local.self ignoreall
local.self forwardspeed 120
local.self behavior Fly pigeon_fly
local.self respondto killed
local.self definestate killed die_gibs
pause
die_gibs:
local.self gib 2 30 0.5 organic
local.self remove
end
|
|