View Single Post
Old 03-06-10, 09:24 PM   #3
Heretic
Commodore
 
Join Date: Mar 2005
Location: Nebraska
Posts: 617
Downloads: 240
Uploads: 2


Default

So here's an example using the Chief. His idles entry are defined in the submarine files

Quote:
strategy CR_CHIEF_IDLE01(wp)
{
strategies Define the strategies
{
CR_CHIEF_TUTORIAL,
CR_CHIEF_NORMAL,
CR_CHIEF_DAMAGE_TAKEN,
CR_CHIEF_PROXIMITY_EXPLOSIONS,
CR_CHIEF_HUNT
}
}
Now here's his NORMAL strategy. The precond statement tells under what conditions this strategy will be used. This one is when the CrewState is not ("!" means not) DMG_TKN, PROX_EXPL, HUNTER, or HUNTED and it's not both the Tutorial and not in the bunker

Quote:
strategy CR_CHIEF_NORMAL(wp)
{
precond
{
!Wp:IsCrewState(DMG_TKN|PROX_EXPL|HUNTER|HUNTED) and !(Wp:IsTutorial() and !Wp:IsBunkerState())
}
action
{

if Wp:IsCurrentWaypoint( "CR_CHIEF" ) then
{
Wp:PlayAnimationAndWait( "CR_CHIEF_Idle01" );
Wp:PlayAnimationAndWait( "CR_CHIEF_Talk2HA_01" );
Wp:PlayAnimationAndWait( "CR_CHIEF_Idle02" );
Wp:PlayAnimationAndWait( "CR_CHIEF_Talk2HELM_01" );
Wp:PlayAnimationAndWait( "CR_CHIEF_Idle01" );
Wp:PlayAnimationAndWait( "CR_CHIEF_Talk_VALVE01" );
Wp:PlayAnimationAndWait( "CR_CHIEF_Idle01" );
Wp:Goto("CR_CHIEF_MAP");
}
endif;
if Wp:IsCurrentWaypoint( "CR_CHIEF_MAP" ) then
{
Wp:PlayAnimationAndWait( "CR_CHIEF_MAP_Idle01" );
Wp:PlayAnimationAndWait( "CR_CHIEF_MAP_Idle02" );
Wp:PlayAnimationAndWait( "CR_CHIEF_MAP_Idle03" );
Wp:Goto("CR_CHIEF");
}
endif;

Wp:ScriptCompleted(); <---- IMPORTANT
}
}
So if he's currently at waypoint "CR_CHIEF", he'll perform a series of animations, then move to "CR_CHIEF_MAP". If he's at the "CR_CHIEF_MAP", he'll do a different set and move back to "CR_CHIEF". Browse through the files and it's pretty easy to figure out what's going on and the potential of this.

Last edited by Heretic; 03-22-10 at 02:02 PM.
Heretic is offline   Reply With Quote