#include "maps/global_scripts/global_common.scr"
#include "maps/global_scripts/global_debugUtils.scr"
Implements a few different ways to have monsters fly in along a spline
path and land in a specific place. Will work with any tiki that has the
"inflight", "land", and in some cases "crash"
animations.
The different types are:
- Spawn a model, fly it in, make it land (each individual spawner/path
can be reused as much as you want)
- Take a model from the map, fly it in, make it land (can only be used
once per monster)
- Take a model from the map, fly it in, make it crash into the world
and show damage to the world (only one use)
For types 2 and 3, there is too much to list here. See "Creating
Flying Creatures".
For type 1:
Create a func_spawn with a good targetname, then make the spline path
you want the flying creature to follow. Connect (via Control+K) the func_spawn
to the first node of the splinepath, link the splinepath together, and
wherever it ends is where the entity will "go live" and start
doing its AI routines. Here are the parameters for reference:
- spawner
The func_spawn that will create entities; is targeted to the first node
of the splinepath.
- spawnModelName
The tiki of what to spawn.
- spawnGroup
AI group to put the spawned entity in.
- spawnMasterState
Masterstate to initialize the new entity with.
- touchThread
Thread to ontouch for the flying entity.
- setTouchTriggers
Should the flying script_model touch triggers?
Flying monsters will explode when shot by default, but you can set a
custom "ontouch" thread if you want.
globalFlyin_Setup( strMasterName, strFlyinType )
Purpose:
Sets up a type 2 or 3 flyin unit (refer to "Creating
Flying Creatures").
Parms:
- strMasterName (string)
The targetname of the creature without the $.
- strFlyinType (string)
The flyin type to setup.
globalFlyin_Launch( strMasterName )
Purpose:
Launches a type 2 or 3 flyin creature that's been setup (refer to "Creating
Flying Creatures").
Parms:
- strMasterName (string)
The targetname of the creature without the $.
entity globalFlyin_SpawnLaunch( spawner, spawnModelName, spawnGroup,
spawnMasterState, touchThread, setTouchTriggers );
Purpose:
Launches a multi-spawn capable type 1 version of the flyin creature.
Returns:
Entity. The entity that was spawned as the creature "goes live"
Parms:
- spawner (entity)
The func_spawn that will create entities; is targeted to the first node
of the splinepath.
- spawnModelName (string)
The tiki of what to spawn.
- spawnGroup (float)
AI group to put the spawned entity in.
- spawnMasterState (string)
Masterstate to initialize the new entity with.
- touchThread (string)
Thread to ontouch for the flying entity.
- setTouchTriggers (float)
Should the flying script_model touch triggers?
|