SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:21 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.