These script docs are designed for Meteor 2 v1.4+ (2024) and not for older "legacy" versions.
- SC_PlaySound
Deprecated function, use playSound instead.
- SC_GetSoundNumberForName
Deprecated function, use getSoundNumber instead.
- SC_PlayDirectionalNumber
Deprecated function, use playSoundNumber2D instead.
- SC_PlayMusic
Deprecated function, use playMusic instead.
- SC_MusicSeekToStart
Deprecated function, use restartMusic instead.
- SC_StopMusic
Deprecated function, use stopMusic instead.
- SC_TogglePauseMusic
Deprecated function, use pauseMusic/resumeMusic instead.
- SC_AddExplosion
Deprecated function, use createExplosion instead.
- SC_GiveItem
Deprecated function, use giveItem instead.
- SC_GetItemCount
Deprecated function, use getItemCount instead.
- SC_ResetAllItems
Deprecated function, use resetItems instead.
- SC_Random
Deprecated function, use randomInt instead.
- SC_EndCurrentLevel
Deprecated function, use endLevel instead.
- SC_GameOver
Deprecated function, use gameOver instead.
- SC_RunMap
Deprecated function, use runMap instead.
- SC_PlayMovieClip
Deprecated function, use playMovieClip instead.
- SC_SetSideId
Deprecated function, use setSideID instead.
- SC_AddObject
Deprecated function, use createObject instead.
- SC_BindObjectToWaypoint
Deprecated function, use bindToWaypoint instead.
- SC_BindObjectToWaypointSoft
Deprecated function, use bindToWaypointSoft instead.
- SC_SetObjectHidden
Deprecated function, use setHidden instead.
- SC_GetObjectHidden
Deprecated function, use getHidden instead.
- SC_ShowObjectTeleport
Deprecated function, use showTeleport instead.
- SC_GetObjectSide
Deprecated function, use getSide instead.
- SC_SetObjectSide
Deprecated function, use setSide instead.
- SC_GetObjectCoords
Deprecated function, use getPos instead.
- SC_SetObjectCoords
Deprecated function, use setPos instead.
- SC_GetObjectAngle
Deprecated function, use getDir instead.
- SC_SetObjectAngle
Deprecated function, use setDir instead.
- SC_GetObjectHits
Deprecated function, use getHits instead.
- SC_SetObjectHits
Deprecated function, use setHits instead.
- SC_GetObjectIndestructible
Deprecated function, use getIndestructible instead.
- SC_SetObjectIndestructible
Deprecated function, use setIndestructible instead.
- SC_GetObjectSpeed
Deprecated function, use getSpeed instead.
- SC_SetObjectSpeed
Deprecated function, use setSpeed instead.
- SC_GetObjectMaxSpeed
Deprecated function, use getMaxSpeed instead.
- SC_SetObjectMaxSpeed
Deprecated function, use setMaxSpeed instead.
- SC_GetObjectDefaultMaxSpeed
Deprecated function, use getDefaultMaxSpeed instead.
- SC_GetObjectAiType
Deprecated function, use getAiType instead.
- SC_SetObjectAiType
Deprecated function, use setAiType instead.
- SC_GetObjectLocked
Deprecated function, use getLocked instead.
- SC_SetObjectLocked
Deprecated function, use setLocked instead.
- SC_GetObjectActive
Deprecated function, use getActive instead.
- SC_SetObjectActive
Deprecated function, use setForceActive instead.
- SC_GetObjectNoTarget
Deprecated function, use getNoTarget instead.
- SC_SetObjectNoTarget
Deprecated function, use setNoTarget instead.
- SC_DoesObjectExist
Deprecated function, use objectExists instead.
- SC_PutObjectOnHorse
Deprecated function, use putOnHorse instead.
- SC_KickObjectOffHorse
Deprecated function, use kickOffHorse instead.
- SC_ObjectHoot
Deprecated function, use hoot instead.
- SC_GetObjectTypeNameForNumber
Deprecated function, use getTypeName instead.
- SC_GetObjectTypeNumberForName
Deprecated function, use objectTypeNameToNumber instead.
- SC_SetObjectFollow
Deprecated function, use setFollow instead.
- SC_ResetObjectRespawnCoords
Deprecated function, use resetRespawnCoords instead.
- SC_ShowPda
Deprecated function, use setPdaOpen instead.
- SC_AddPdaMessage
Deprecated function, use addPdaMessage instead.
- SC_LoadPdaMessage
Deprecated function, use loadPdaMessage instead.
- SC_RemovePdaMessage
Deprecated function, use removePdaMessage instead.
- SC_ClearAllPdaMessages
Deprecated function, use clearAllPdaMessages instead.
- SC_PlayerGetInVehicle
Deprecated function, use playerGetInVehicle instead.
- SC_PlayerGetOutOfVehicle
Deprecated function, use playerGetOutOfVehicle instead.
- SC_IsPlayerInVehicle
Deprecated function, use isPlayerInVehicle instead.
- SC_SetPlayerObjectId
Deprecated function, use setPlayerObject instead.
- SC_GetPlayerObjectId
Deprecated function, use getLocalPlayer instead.
- SC_SetPlayerInteractionEnabled
Deprecated function, use setPlayerInteractionEnabled instead.
- SC_GetPlayerInteractionEnabled
Deprecated function, use getPlayerInteractionEnabled instead.
- SC_SetSectorTexture
Deprecated function, use setSectorTexture instead.
- SC_GetSectorTexture
Deprecated function, use getSectorTexture instead.
- SC_SetSectorHidden
Deprecated function, use setSectorHidden instead.
- SC_GetSectorHidden
Deprecated function, use getSectorHidden instead.
- SC_SetSectorTriggerEnabled
Deprecated function, use setSectorTriggerEnabled instead.
- SC_GetSectorTriggerEnabled
Deprecated function, use getSectorTriggerEnabled instead.
- SC_OpenDoor
Deprecated function, use openDoor instead.
- SC_OpenForcefield
Deprecated function, use openForcefield instead.
- SC_CloseForcefield
Deprecated function, use closeForcefield instead.
- SC_SetSectorDamage
Deprecated function, use setSectorDamage instead.
- SC_GetSectorDamage
Deprecated function, use getSectorDamage instead.
- SC_AddSprite
Deprecated function, use createSprite instead.
- SC_SetSpriteHidden
Deprecated function, use setSpriteHidden instead.
- SC_GetSpriteHidden
Deprecated function, use getSpriteHidden instead.
- SC_PassToConsole
Deprecated function, use passToConsole instead.
- SC_MessageBox
Deprecated function, use messageBox instead.
- SC_GameMessage
Deprecated function, use gameMessage instead.
- SC_ConsoleMessage
Deprecated function, use print instead.
- SC_StringInputBox
Deprecated function, use stringInputBox instead.
- SC_ConfirmBox
Deprecated function, use confirmBox instead.
- SC_CreateToolbar
Deprecated function, use createToolbar instead.
localOnly has no effect (always true).
- SC_DestroyToolbar
Deprecated function, use deleteToolbar instead.
localOnly has no effect (always true).
- SC_AddToolbarButton
Deprecated function, use addToolbarButton instead.
localOnly has no effect (always true).
- randomInt
Generate a int between lower and upper (both inclusive).
- randomFloat
Generate a random float between lower and upper (both inclusive).
- randomDir
Generate a random direction/angle.
- randomSeed
Generate a random seed value.
- randomArray
Pick a random element from an array.
- getPerlinSample
Generate a value based on a 2D vector and a seed using perlin noise.
- getRotatedSize
Get the bounds size of a rectangle rotated in degrees.
- rotatePoint
Rotate a point around a pivot.
- pixelsToMetres
Convert pixels to metres.
- metresToPixels
Convert metres to pixels.
- getBearingTo
Get the bearing from fromPos to toPos in the range 0-360.
- moveForwardOnBearing
Move a position along bearing and return the result.
- rotateTowards
Rotate angle towards target angle.
- getDistance
Get the distance between 2 points in pixels.
- getDistanceMetres
Get the distance between 2 points in metres.
- clamp
Clamp a number between two values.
- min
Return the smallest of two values.
- max
Return the largest of two values.
- lerp
Linear interpolate a value between a and b by the normalised fraction t.
- fmodf
Return the fraction remainder of x/y.
- createStringHash
Generate a hash value from a string (string is case sensitive).
- createStringHashLowerCase
Generate a lower case hash value from a string (string is automatically converted to lower case).
- print
print text to the screen and console.
- log
Output text to the log only.
- logPrint
Print text to the screen and console. Also output text to the log file.
- createSector
Create a new sector.
- deleteSector
Delete a sector
- updateSectors
Update map sectors, physics and minimap etc after creating new sectors using createSector or changing sectors passable type using setSectorPassableType.
If creating multiple sectors call updateSectors once afterwards.
- getDefaultSectorTexture
Get the default sector texture name (no texture).
- getSectorTexture
Get a sector's texture name.
- setSectorTexture
Set a sector's texture name.
- getSectorPassableType
Get a sector's passable type.
passableType value examples: TPT_LAND, TPT_WATER, TPT_SOLID, TPT_CLOSED, TPT_LOW_WALL
- setSectorPassableType
Set a sector's passable type.
passableType value examples: TPT_LAND, TPT_WATER, TPT_SOLID, TPT_CLOSED
- getSectorBevelType
Get a sector's bevel type.
bevelType value examples: BT_FLAT, BT_RAISED, BT_SUNK
- setSectorBevelType
Set a sector's bevel type.
bevelType value examples: BT_FLAT, BT_RAISED, BT_SUNK
- getSectorWaterEffect
Get a sector's water effect flag.
- setSectorWaterEffect
Set a sector's visual water effect flag.
- getSectorIsShadow
Get a sector's shadow flag.
- setSectorIsShadow
Set a sector's shadow flag.
- getSectorShadowMode
Get a sector's shadow mode.
- setSectorShadowMode
Set a sector's shadow mode.
- getSectorHidden
Get a sector's hidden status.
- setSectorHidden
Show or hide a sector.
- getSectorTriggerEnabled
Determine if a sector's script trigger is enabled.
- setSectorTriggerEnabled
Enable or disable a sector's script trigger.
- getSectorDamage
Get a sectors damage amount to apply to ground objects (e.g. lava floor).
- setSectorDamage
Set a sectors damage amount to apply to ground objects (e.g. lava floor).
- openDoor
Opens a door sector just as if the player had walked into it.
- closeDoor
Closes a door.
- openForcefield
Opens a forcefield (changes sector to passable and sets texture to forcefield opened texture).
- closeForcefield
Closes a forcefield (changes sector to solid and sets texture to specified texture).
- getPos
Get the position of a unit or player.
- setPos
Set the position of a unit or player.
- getDir
Get the direction of a unit or player in the range 0-360.
- setDir
Set the direction of a unit or player in the range 0-360.
- getHeight
Get the height above the ground of an object.
- getMaxHeight
Get the maximum height above the ground of an object.
- getVar
Get a named variable value from an object.
- setVar
Set a named variable value to an object.
- getVarNames
Get an array with all the variable names from an object.