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


Default

Scripting commands
The script files are text files with an aix suffix in data\scripts\AI\crew. they can be edited using any text editor. You define 'strategies' that the crewmen will perform when the circumstances you define for them are met. So, you can have different behaviors when surfaced or submerged, etc. I've mostly dealt with the idle strategies, so that's what I'll describe. You can also set up strategies for use with commands.

Here are the functions I've identified

Wp:GetCurrentlyLoadingTube()
Wp:GetGlobalVariable(variable)
Wp:IsBunkerState()
Wp:IsCharacterPosture(val) A,B,C,D,E (don't know what the postures are)
Wp:IsConningTower("tower")
Wp:IsCrewState(val) DMG_TKN, HUNTER, HUNTED, PROX_EXPL, T_FIRED, T_TRAVEL, T_HIT, T_MISS, SIL_RUN, B_STATIONS - B_STATIONS doesn't appear to work
Wp:IsCurrentWaypoint("waypoint")
Wp:IsGunManned(slot)
Wp:IsSubmerged()
Wp:IsSurfaced()
Wp:IsTorpedoLoadingInProgress()
Wp:IsTutorial()

Wp:BindAvatarCameraToObject("object", var)
Wp:DeactivateCrewState(val)
Wp:DoNothing()
Wp:ExecuteCommand
Wp:GetDistanceToAvatar()
Wp:GetGunType(slot)
Wp:GetHydrophoneState()
Wp:GetRadarState()
Wp:Goto("waypoint")
Wp:LoadTorpedo("animation", val)
Wp:ManTheGun(slot, "text", role) - ROLE_GUNNER, ROLE_TRAV, ROLE_ELEV
Wp:PlayAnimation("animation")
Wp:PlayAnimationAndWait("animation")
Wp:PlayAttenuatedSoundWithLipsync("file", delay);
Wp:PlaySoundWithLipsync("file", delay);
Wp:ScriptCompleted();
Wp:SetBodyPartVisibility(part, 0/1) VERY nice. Can change and add parts
Wp:SetGlobalVariable(variable, value)
Wp:SetNonInteractive()
Wp:Teleport("waypoint")
Wp:UnbindAvatarCamera(1)
Wp:UnmanTheGun(slot, role)

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