Редактор

~~~~~~~~~~~Список скриптовых функций~~~~~~~~~~~~~


Материал взять с форума Nival.ru. Автор - Novik (Silest.ru\inside)
Функциям предшествуют параметры\возвращаемые значения, которые они могут принимать.
Если нужно более подробное описание какой-либо функции - обращайтесь на форумы Sentinels и Nival.ru. Либо пишите на e-mail или в гостевую книгу.


unit WhoHasInventoryItem( nItemID )
bool HasInventoryItemUnit( unit, nItemID )
bool HasInventoryItemGroup( unit, nItemID )
str GetGlobalGameVar( sVar, sDef="" )
void SetGlobalGameVar( sVar, sVal )
bool IsRealTime()
void Explosion( nGrenadeID, sWaypointName )
int GetTurn()
void Difficulty( n )
number GetDifficulty()
int GetDiplomacy( nPlayer1, nPlayer1 )
void SetDiplomacy( nPlayer1, nPlayer2, nDiplomacy )
int UnitGetDiplomacy( unit, nDiplomacy )
void UnitSetDiplomacy( unit, nPlayer, nDiplomacy )
bool IsUIActionIDPresent( UI_ID )
camera GetCamera( nCameraID )
UI_ID CameraMove( camera, transitionTime, tStartShift = 0, tEndShift = 0 )
void CameraLock( bEnable )
void CameraSetClipping( n1, n2 )
UI_ID CameraSequence( cameraTable[], transitionTime )
UI_ID AdvancedCameraMove( startCamera, targetCamera, transitionTime, tStartShift = 0, tEndShift = 0 )
UI_ID FocusCamera( object/unit )
UI_ID c_BeginSequence( bEnable = false )
void EndSequencePart()
UI_ID EndSequence( bool1 = false, bool2 = false )
void UpdateVisible()
void Floor( nFloor )
void c_DelayGameStartEx()
void c_StartGameEx()
void DestroyItemInHand()
void WantTurnBased( bEnable )
unit GetUnit( sUnitName )
unit CreateUnit( nPersID, nPlayerID, szName, szWaypoint, nLevel )
unit GetHero()
unit GetUnitPK( unit )
void UnitApplyCritical( unit, criticalID )
void UnitApplyCritical( unit, criticalLocation, criticalID )
void UnitApplyTableCritical( unit, criticalID, nDC[] )
void UnitSetXPLevel( unit, nLevel )
void UnitGiveXP( unit, nExp )
group UnitGetVisible( unit )
bool UnitIsAction( unit )
void UnitMoveToWaypoint( unit, sWaypointName )
void UnitSetToWaypoint( unit, sWaypointName )
void UnitFlyToWaypoint( unit, sWaypointName )
void UnitShoot( unit, uTarget, nHitLocation )
int UnitGetShootMode( unit )
void UnitSetShootMode( unit, nMode )
int UnitGetMeleeMode( unit )
void UnitSetMeleeMode( unit, nMode )
int UnitGetPose( unit )
void UnitSetPose( unit, nPose )
int UnitGetWishPose( unit )
void UnitSetWishPose( unit, nPose )
int UnitGetDirection( unit )
void UnitSetDirection( unit, nDirection )
bool UnitIsDead( unit )
bool UnitIsUnconscious( unit )
void UnitSayAck( unit, nAckConditionID )
bool UnitIsSeeUnit( unit, uTarget )
void UnitReload( unit )
void UnitCheat( unit, nCheatID, bEnable )
void UnitSetRoute( unit, route )
void UnitKill( unit )
void UnitPlayAnimation( unit, nAniID, bCircled = false, bFreezeAfterLastFrame = false )
bool UnitIsHiding( unit )
void UnitHide( unit, bEnable = true )
void UnitDrawPerksTree( unit )
void UnitWriteTakenPerks( unit )
void UnitTakePerk( unit, nPerkID )
void UnitCancelAction( unit )
void UnitRemove( unit )
str UnitGetName( unit )
str UnitGetRealName( unit )
void UnitSetRealName( unit, sName )
int UnitGetPlayer( unit )
void UnitSetPlayer( unit, nPlayer )
void UnitSetDialog( unit, sDialogCode )
bool UnitCanTalk( unit )
void UnitSetCanTalk( unit, bEnableHero = true, bEnableAther = false )
void UnitRoaming( unit, sWaypointName, nRadius )
void UnitTakeCorpse( unit, uTarget )
void UnitDropCorpse( unit )
bool UnitIsCarryingCorpse( unit, uTarget )
bool UnitIsCarryingAnyCorpse( unit )
void UnitMakeUnconscious( unit, bDeadAnimation = true )
bool UnitIsWeaponActive( unit )
void UnitActivateWeapon( unit, bEnable = true )
bool UnitIsInPocket( unit )
void UnitPlaceInPocket( unit )
void UnitRestoreFromPocket( unit )
route UnitGetRoute( unit )
bool UnitIsWearingPK( unit )
void UnitWearPK( unit, uEmptyPK )
unit UnitLeavePK( unit )
void UnitTakeObject( unit, item )
void UnitHoldItem( unit, item )
void UnitSwitchToGrenade( unit )
void UnitDrawWeapon( unit )
int UnitGetSkill( unit, nSkill )
void UnitSetSkill( unit, nSkill, nValue )
void UnitSetSkillMaxValue( unit, nSkill, nValue )
int UnitGetSkillMaxValue( unit, nSkill )
void UnitShootPrepare( unit, uTarget, nHitLocation )
int UnitGetToHitUnit( unit, uTarget, nHitLocation = -1 )
int UnitGetToHitWaypoint( unit, sWaypointName, nTileHitLocation = 0 )
int UnitSetToHit( unit, nToHit )
bool UnitInArea( unit, sWaypointName1, sWaypointName2 )
void UnitAttackWaypoint( unit, sWaypointName )
void UnitKeepMoving( unit )
void UnitStop( unit )
void UnitCreateItem( unit, nItemID, bIsClue = false )
void UnitRemoveItem( unit, item )
item UnitGetFirstItem( unit )
item UnitGetNextItem( unit, itemPrev )
int UnitGetItemID( unit, item )
int UnitGetItemType( unit, item )
item UnitGetSlotItem( unit, nSlot )
void UnitEquipSlotItem( unit, nSlot, item )
void UnitTakeOffSlotItem( unit, nSlot )
int UnitGetActiveSlot( unit )
bool UnitCanSetSlotItem( unit, nSlot, item )
bool UnitIsUsingCannon( unit )
bool UnitIsHearUnit( unit, uTarget )
bool UnitIsWeaponInHand( unit, nWeaponType )
bool UnitIsPoseLocked( unit )
void UnitLockPose( unit, bLock )
void UnitGrenadeToUnit( unit, uTarget, nToHit, nGrenadeID )
void UnitGrenadeToWaypoint( unit, sWaypointName, nToHit, nGrenadeID )
void UnitHealCriticals( unit, nDC = -1 )
void UnitRegenerateVP( unit, nVP )
void UnitSetRetreatLogic( unit, sWaypointName )
void UnitSetSwarmLogic( unit, sWaypointName )
void UnitSetNormalLogic( unit )
void UnitSetGuardLogic( unit, nAPRadius = 4 )
void UnitSetFearLogic( unit )
void UnitSetPanicLogic( unit )
void UnitSetCivilianLogic( unit, nAPRadius )
void UnitSetScriptLogic( unit )
void UnitGiveRandomPerks( unit )
void UnitSetHideProbability( unit, nProbability )
void UnitSetAnimSpeed( unit, nSpeed )
void UnitWeaponSetDurability( unit, nDurability, nCurMaxDurability = -1, nMaxDurability = -1 )
int, int, int UnitWeaponGetDurability( unit )
void UnitWeaponSetBroken( unit )
void UnitWeaponSetJammed( unit )
void UnitWeaponRepairAsOnBase( unit )
void UnitWeaponRepairJammed( unit, nEngSkill )
void UnitWeaponRepairBroken( unit, nEngSkill )
void UnitUseWeaponType( unit, nWeaponType )
void UnitThrowWeaponOut( unit )
bool UnitIsStrafing( unit )
void UnitSetStrafe( unit, bEnable = true )
void UnitSetBody( unit, nModelID )
void UnitPutWeaponToBackpack( unit )
void UnitAddToParty( unit )
void UnitRemoveFromParty( unit, nNewPlayer )
int UnitGetAIState( unit )
void UnitAttachToCannon( unit, object, bEnable = true )
void UnitRemoveInventoryItem( unit, nItemID )
int UnitGetEffectiveEngSkill( unit )
int UnitGetFloor( unit )
void UnitSetNoRenderItems( unit, bEnable )
void UnitMakeUnconsciousWithVector( unit, nX, nY, nZ, nStrength )
int UnitGetAmmoQuantityInHand( unit )
bool IsUnitHasPerk( unit, nPerkID )
void UnitMoveInventoryToStore( unit )
void UnitRemoveWhenOnBase( unit )
void UnitSelectSlot( unit, nSlot )
void RobotActivateGun( unit, nWeaponType )
void UnitAllowHide( unit, bEnable = true )
void UnitLookAtUnit( unit, uTarget )
bool UnitIsRobot( unit )
void UnitSetUniform( unit, item )
item UnitGetUniform( unit )
void UnitSetArmour( unit, item )
item UnitGetArmour( unit )
void UnitDisableCriticals( unit, bDisable )
int UnitGetID( unit )
void UnitSetToolTipAdditional( unit, str )

// Inner Route
bool RouteIsFinished( unit )

// Player
group PlayerGetUnits( nPlayer )
group PlayerGetUnitsEx( nPlayer, nSubPlayer )
void PlayerGiveTurn( nPlayer )
number PlayerGetMoney( nPlayer )
void PlayerGiveMoney( nPlayer, nMoney )
void PlayerTakeMoney( nPlayer, nMoney )
bool IsInterrupt()
void PlayerEndTurn()
int WhichPlayerTurn()

// UnitGroup
group CreateGroup( sUnitName1, sUnitName2, ... )
group GetGroup( nGroupID )
int GroupGetID( group )
void GroupAddUnit( group, unit )
void GroupRemoveUnit( group, unit )
int GroupGetSize( group )
unit GroupGetUnit( group, nIndex )
bool GroupIsContainUnit( group, unit )
void GroupMoveToWaypoint( group, sWaypointName )
group GroupGetVisible( group )
void GroupSetRoute( group, route, bCircled )
void GroupCheat( group, nCheatID, bEnable )
group GroupAddGroup( group1, group2 )
group GroupGetCross( group1, group2 )
group GetAllZonePK()

UI_ID DialogPlay( sDialogCode, bHeroAtLeft = true )
UI_ID DialogPlayAsAcks( sDialogCode )
UI_ID MessageBox( nStrID )
UI_ID YesNoDialog( nStrID )
int GetLastDialogResult()
UI_ID DialogModeBegin()
UI_ID DialogModeEnd()
UI_ID DialogModeSet( nStrHeaderID, nChoiceCnt, nParamCnt, nChoice1, ... nParam1, ... )

route CreateRoute( sWaypointName1, sWaypointName2, ... )

object GetObject( sObjectName )
object CreateObject( nObjID, sWaypointName, nAngle, sObjName )
void ObjectOpen( object )
void ObjectClose( object )
bool ObjectIsLockedDoor( object )
void ObjectLockDoor( object, nPower, nKeyID )
void ObjectUnlockDoor( object )
bool ObjectIsOpened( object )
void ObjectDestroy( object )
void ObjectRemove( object )
void ObjectSetToWaypoint( object, sWaypointName, nAngle )
void ObjectPlayAnimation( object, nAniID )
bool ObjectIsAction( object )
void ObjectSetDestroyStage( object, nStage )
str ObjectGetName( object )
void ObjectCancelAction( object )
void CreateAndActivateItem( unit, nItemID )
int ObjectGetDestroyStage( object )
bool ObjectIsInPocket( object )
void ObjectPlaceInPocket( object )
void ObjectRestoreFromPocket( object )
int ObjectGetHP( object )
int ObjectGetFloor( object )
int ObjectGetID( object )

item GetItem( sItemName )
item FindItem( nItemID )
str ItemGetName( item )
void ItemRemove( item )
void ItemUnload( item )
void ItemSetToWaypoint( item, sWaypointName )
bool ItemIsBroken( item )
bool ItemIsJammed( item )
int ItemGetDurability( item )
int ItemGetMaxDurability( item )
int ItemGetCurMaxDurability( item )
int ItemGetID( item )
int ItemGetWeight( item )
item ItemCreate( nItemID )
int ItemGetType( item )
void ItemSetBroken( item )
void ItemSetJammed( item )
void ItemSetDurability( item, nDurability, nMaxCurDurability, nMaxDurability )
item ItemLootNext( item = nil )

// Scenario
void ExitToGlobal()
void ExitToChapter()
int GetCurrentZoneAILevel()
int GetScenarioNumber()
void LeaveToSubZone( nPassageID )
void ScenarioAddGoal( nGoalID )
void ScenarioSetGoalComplete( nGoalID, bEnable = true )
void ScenarioSetTaskComplete( nGoalID, nTaskID, bEnable = true )
void BeginZone( sZoneName )
void BeginTemplate( nTemplateID )
void SetTutorialMode( bEnable )
void SetMaxCriticalSeverity( nSeverity )
void SetFirstMissionMode( bEnable )
void EnableFeature( sFeature )
void AddHints( nLastHintID )
bool IsScenarioBlockComplete( nBlockNo )
bool CheckScenarioBlockJustComplete( nBlockNo )
void ScenarioSetGoalVisible( nGoalID, bEnable = true )
int GetNextBlockOrder()
bool IsReadyForNextBlock()
bool IsMissionTaken()
void CompleteAllBlocksBefore( nBlockNo )
int NumMissionInBlock()
void AddJournalRecord( nRecordID )
bool AddJournalRecordEx( nRecordID, nParam0, nParam1, ... )
void HighlightClue( unit/item, bHigh = true )
void HighlightUnitAlways( unit, bHigh = true )
int NumAvailableMissions()
void TakeMission()
bool ScenarioGetTaskComplete( nGoalID, nTaskID )
void Win( nStrQstID = 20238 )
void ScenarioAddVisibleZone( sZoneName )
void ScenarioDeleteVisibleZone( sZoneName )
void BeginScenario( nGlobalID, sZoneName = nil )
void SetGoalBlocking( nGoalID, bBlocking )
bool WasLastZoneComplete()
bool WasLastZoneFailed()
bool WasLastZoneEveryObjComplete()

// Interface
void Pause()
void BP( sBreakPointName = nil, bSet = true )
void Save( sSaveName )
UI_ID FadeIn( nR = 0, nG = 0, nB = 0, nTime = 1000 )
UI_ID FadeOut( nR = 0, nG = 0, nB = 0, nTime = 1000 )
void uiShowShop()
void uiShowLoot()
void uiShowStore()
void uiShowTeamMngMenu()
void uiShowMissionSelection()
UI_ID ShowHint( nHintID )
void ShowLeaveZoneDialog( nStrID )
void ShowLoseDialog( nStrID = -1 )
UI_ID PlayVideo( sSeqFileName )
void SetLeaveZoneMode( bEnable, nStrID = -1 )
UI_ID ShowHallOfFame( bAddCurrent )
UI_ID ShowObjectives()
void SpecialCinematicAnimations( bEnable )
void CinematicSloMo( nRatio )
void SetShopMode( nPlayer, bCustomShop, nShopID = 0 )
void AddShopItem( nPlayer, nShopID, nItemID )
void ClearShop( nPlayer, nShopID )
void PlaceTemplate( nTemplateID, sWaypointName, bPlaceBuildings = false )

pos GetPos( u/o/i )
pos GetWaypointPos( s )
int GetWaypointFloor( s )
number GetDistance( pos1, pos2 )
void CreateWaypoint( s, u )
void DeleteWaypoint( s )
void RecalcWaypointPos( s )
bool PassCalcerIsActive()
void SlowSyncAIMap()
sound PlaySound( nSndID )
sound Play3DSound( nSndID, pos )
void SetupAmbientLight( nLightID )
void SetAmbientEffect( nEffectID )
int GetTimeOfDay()
void SetTimeOfDay( nTimeOfDay )
effect PlayEffect( nEffectID, pos, nX = 0, nY = 1, nZ = 0 )
void StopEffect( effect )
void StopSound( sound )
void AttachEffectToWaypoint( nEffectID, sWaypointName )
void AttachEffectToUnitBone( nEffectID, unit )
void ScriptShadows( bEnable )
void KillEmAll()
UI_ID TestFPS()
void ExecCommand( sConsoleCmd )
void ShowCursor( bEnable )
void OutLog( sMsg, nStreamID = 0 )
number Pow( nVal, nDegree )
void PauseMusic( bEnable )
void BlockChapterRE( bEnable = false )
int RPGDiffGetAIAP()
int RPGDiffGetAIVP()
int RPGDiffGetAILevel()
int RPGDiffGetHideProb()

// функции доступные только в H&S

int RPGDiffGetTimeDivider() // after patch only
string GetString( nStringID )
void SetLootMode( bEnable, nStrID = -1 )
nCityHide, nForestHide GetUniformModifiers( item )
void UnitSetTalkDistance( nDist )
void ScenarioHighlightZone( sZoneName, bHighlight )
void AutoSave( bIsEndMission = false )
void TempForbidTrackers()
void SetMiscConst( nConstID, nConstVal )
nConstVal GetMiscConst( nConstID )
string ScenarioGetCurrentZoneName()
int UnitGetClass( unit )
void UnitIncAdaptation( unit, nWeaponID, nValue )
item UnitGetCannonItem( unit )
nErrCode, nStartAP, nFullAP UnitGetAPToHitUnit( unit, victim )
nErrCode, nStartAP, nFullAP UnitGetAPToHitWaypoint( unit, sWaypointName )
nWeaponID, nCurrentAdaptation, nAdaptationCounter UnitGetWeaponAdaptationInfo( unit, nWeaponClass )
void UnitSetWeaponAdaptationInfo( unit, nWeaponID, nCurrentAdaptation, nAdaptationCounter )
void EnableGlobalInterface()
int ItemGetTypeEx( item )
UI_ID ShowHintEx( nHintID, nTextureID, nParamCount, param1, param2, ... )
void StopWeatherEffect()
void OutHdr( string, nStreamID = 0 )
void UnitClearSounds( unit )
number UnitGetStat( unit, nStatID )
void UnitSetStat( unit, nStatID, nStatValue )
void UnitUpdateAnimation( unit )
bool IsAttackAllowed()
void SetAttackAllowed( bEnable = true )
void AddMedalPoints( unit, nPoints )
void PlayerSetMaySeeTraps( nPlayer, bMaySee = true )
int UnitGetXPToNextLevel( unit )
void UnitRemoveArmour( unit )
void UnitClearModifiers( unit )
void UnitSetTempModifier( unit, nSkillID, nValue, nTurns )


Hosted by uCoz