APIs in Vanda engine are functions that allow the user to perform certain tasks at runtime. You should use APIs inside scripting events. APIs are defined in the following general form:
return1, return2,..., returnN API_name(argunment1, argument2,...,argumentN)
An API may take the parameters argunment1, argunment2,…,argumentN, performs an action, and returns the values return1, return2,…, returnN if necessary. An API may take no input arguments and return no value. But in any case, it does something at runtime. Here are some examples:
Example 1
ActivateThirdPersonCamera()
This function takes no input arguments and returns no value, and only activates the third-person physics camera attached to the game’s main character.
Example 2
CreateFolder(string folderPath)
This function takes a string argument and creates a folder in the path “Assets/Data/folderPath”. This function does not return a value.
Example 3
bool IsWaterVisible(string waterName)
This function receives the name of the water as a string value and determines whether this water is visible or not. The result is returned as a Boolean value of true or false.
Example 4
double,double,double GetCharacterControllerPosition()
This function does not receive any input arguments and returns the X, Y and Z position of the character controller as three double values.
In this section, we explain the scripting functions available in Vanda engine.
A
- ActivateEngineCamera
- ActivateFirstPersonCamera
- ActivateImportedCamera
- ActivateImportedCameraOfPrefabInstance
- ActivateThirdPersonCamera
- AddForceToCharacterController
- AddForceToPrefabInstance
- AddTorqueToPrefabInstance
- AttachPrefabInstanceToWater
C
D
- DeleteAllResources
- DeletePrefabInstance
- DeleteResource
- DetachPrefabInstanceFromWater
- DisableBloom
- DisableCharacterControllerJump
- DisableDepthOfField
- DisableDirectionalShadow
- DisableFog
- DisableGeneralWaterReflection
- DisablePhysicsDebugMode
- DisablePhysicsGravity
- DisablePhysicsGroundPlane
- DisablePrefabInstanceMaterial
- DisableSkyFog
- DisableVSync
- DisableWaterShadow
- DisableWaterSunReflection
E
- EnableBloom
- EnableCharacterControllerJump
- EnableDepthOfField
- EnableDirectionalShadow
- EnableFog
- EnableGeneralWaterReflection
- EnablePhysicsDebugMode
- EnablePhysicsGravity
- EnablePhysicsGroundPlane
- EnablePrefabInstanceMaterial
- EnableSkyFog
- EnableVSync
- EnableWaterShadow
- EnableWaterSunReflection
- ExecuteCyclicAnimation
- ExecuteNonCyclicAnimation
- ExitGame
G
- GeneratePrefabInstance
- Get3DSoundScriptBoolVariable
- Get3DSoundScriptDoubleVariable
- Get3DSoundScriptIntVariable
- Get3DSoundScriptStringVariable
- GetAmbientSoundScriptBoolVariable
- GetAmbientSoundScriptDoubleVariable
- GetAmbientSoundScriptIntVariable
- GetAmbientSoundScriptStringVariable
- GetAnimationClipDurationOfPrefabInstance
- GetAnisotropicFilteringValue
- GetBloomColor
- GetBloomIntensity
- GetCameraScriptBoolVariable
- GetCameraScriptDoubleVariable
- GetCameraScriptIntVariable
- GetCameraScriptStringVariable
- GetCharacterControllerCapsuleHeight
- GetCharacterControllerCapsuleRadius
- GetCharacterControllerForcePower
- GetCharacterControllerJumpPower
- GetCharacterControllerPosition
- GetCharacterControllerRunSpeed
- GetCharacterControllerStepOffset
- GetCharacterControllerWalkSpeed
- GetCursorX
- GetCursorY
- GetDepthOfFieldFocalDistance
- GetDepthOfFieldFocalRange
- GetDirectionalShadowAlgorithm
- GetDirectionalShadowFarClipPlane
- GetDirectionalShadowIntensity
- GetDirectionalShadowLight
- GetDirectionalShadowNearClipPlane
- GetDirectionalShadowNumberOfSplits
- GetDirectionalShadowResolution
- GetDirectionalShadowWeightOfSplits
- GetDistanceBetweenPhysicsCameraAndCharacterController
- GetDistanceOfPrefabInstanceFromPhysicsCamera
- GetElapsedTime
- GetEngineCameraAngle
- GetEngineCameraFarClipPlane
- GetEngineCameraNearClipPlane
- GetEngineCameraPan
- GetEngineCameraPosition
- GetEngineCameraTilt
- GetFogColor
- GetFogDensity
- GetGlobalSoundVolume
- GetGUIButtonPosition
- GetGUIButtonScriptBoolVariable
- GetGUIButtonScriptDoubleVariable
- GetGUIButtonScriptIntVariable
- GetGUIButtonScriptStringVariable
- GetGUIImagePosition
- GetGUIPosition
- GetGUITextPosition
- GetLightAmbient
- GetLightDiffuse
- GetLightScriptBoolVariable
- GetLightScriptDoubleVariable
- GetLightScriptIntVariable
- GetLightScriptStringVariable
- GetLightShininess
- GetLightSpecular
- GetMainCharacterScriptBoolVariable
- GetMainCharacterScriptDoubleVariable
- GetMainCharacterScriptIntVariable
- GetMainCharacterScriptStringVariable
- GetMenuCursorSize
- GetMultisamplingValue
- GetPhysicsActorGroup
- GetPhysicsCameraAngle
- GetPhysicsCameraFarClipPlane
- GetPhysicsCameraMaxTilt
- GetPhysicsCameraMinTilt
- GetPhysicsCameraNearClipPlane
- GetPhysicsCameraTilt
- GetPhysicsCameraYaw
- GetPhysicsCollisionFlags
- GetPhysicsDefaultDynamicFriction
- GetPhysicsDefaultRestitution
- GetPhysicsDefaultSkinWidth
- GetPhysicsDefaultStaticFriction
- GetPhysicsGravity
- GetPhysicsGroundHeight
- GetPrefabInstanceAmbient
- GetPrefabInstanceDiffuse
- GetPrefabInstanceEmission
- GetPrefabInstanceNameFromActor
- GetPrefabInstanceRadius
- GetPrefabInstanceRotate
- GetPrefabInstanceScale
- GetPrefabInstanceScriptBoolVariable
- GetPrefabInstanceScriptDoubleVariable
- GetPrefabInstanceScriptIntVariable
- GetPrefabInstanceScriptStringVariable
- GetPrefabInstanceShininess
- GetPrefabInstanceSpecular
- GetPrefabInstanceTranslate
- GetPrefabInstanceTransparency
- GetScreenHeight
- GetScreenResolution
- GetScreenWidth
- GetSelectionDistance
- GetSkyPosition
- GetSkyScriptBoolVariable
- GetSkyScriptDoubleVariable
- GetSkyScriptIntVariable
- GetSkyScriptStringVariable
- GetSoundLoop
- GetSoundMaxDistance
- GetSoundPitch
- GetSoundPlay
- GetSoundPosition
- GetSoundReferenceDistance
- GetSoundRollOff
- GetSoundVolume
- GetTerrainAmbient
- GetTerrainDiffuse
- GetTerrainScriptBoolVariable
- GetTerrainScriptDoubleVariable
- GetTerrainScriptIntVariable
- GetTerrainScriptStringVariable
- GetTerrainShininess
- GetTerrainSpecular
- GetTriggerScriptBoolVariable
- GetTriggerScriptDoubleVariable
- GetTriggerScriptIntVariable
- GetTriggerScriptStringVariable
- GetVideoDuration
- GetVideoLoop
- GetVideoPlay
- GetVideoScriptBoolVariable
- GetVideoScriptDoubleVariable
- GetVideoScriptIntVariable
- GetVideoScriptStringVariable
- GetVideoVolume
- GetVSceneScriptBoolVariable
- GetVSceneScriptDoubleVariable
- GetVSceneScriptIntVariable
- GetVSceneScriptStringVariable
- GetWaterFlowSpeed
- GetWaterLightPosition
- GetWaterPosition
- GetWaterRotation
- GetWaterScale
- GetWaterScriptBoolVariable
- GetWaterScriptDoubleVariable
- GetWaterScriptIntVariable
- GetWaterScriptStringVariable
- GetWaterTransparency
- GetWaterUnderwaterColor
- GetWaterUnderwaterFogDensity
- GetWaterUV
H
I
- IsCharacterControllerLocked
- IsGeneralWaterReflectionEnabled
- IsKeyDown
- IsPrefabInstanceMaterialEnabled
- IsSkyFogEnabled
- IsVSyncEnabled
- IsWaterShadowEnabled
- IsWaterSunReflectionEnabled
- IsWaterVisible
L
O
P
- PauseAll3DSounds
- PauseAllAmbientSounds
- PauseAllAnimationsOfPrefabInstances
- PauseAllResourceSounds
- PauseAllSounds
- PauseAllUpdateEvents
- PauseAnimationOfAllWaters
- PauseGame
- PauseMainCharacterAnimations
- PausePhysics
- PausePrefabInstanceAnimations
- PauseResourceSound
- PauseSound
- PauseUpdateEventOf3DSound
- PauseUpdateEventOfAll3DSounds
- PauseUpdateEventOfAllAmbientSounds
- PauseUpdateEventOfAllEngineCameras
- PauseUpdateEventOfAllLights
- PauseUpdateEventOfAllPrefabInstances
- PauseUpdateEventOfAllWaters
- PauseUpdateEventOfAmbientSound
- PauseUpdateEventOfEngineCamera
- PauseUpdateEventOfLight
- PauseUpdateEventOfMainCharacter
- PauseUpdateEventOfPrefabInstance
- PauseUpdateEventOfSky
- PauseUpdateEventOfTerrain
- PauseUpdateEventOfVSceneScript
- PauseUpdateEventOfWater
- PauseWaterAnimation
- PlayAll3DSounds
- PlayAll3DSoundsLoop
- PlayAll3DSoundsOnce
- PlayAllAmbientSounds
- PlayAllAmbientSoundsLoop
- PlayAllAmbientSoundsOnce
- PlayAllPaused3DSounds
- PlayAllPaused3DSoundsOnce
- PlayAllPaused3DSoundsOnce
- PlayAllPausedAmbientSounds
- PlayAllPausedAmbientSoundsLoop
- PlayAllPausedAmbientSoundsOnce
- PlayAllPausedResourceSounds
- PlayAllPausedResourceSoundsLoop
- PlayAllPausedResourceSoundsOnce
- PlayAllPausedSounds
- PlayAllPausedSoundsLoop
- PlayAllPausedSoundsOnce
- PlayAllResourceSounds
- PlayAllResourceSoundsLoop
- PlayAllResourceSoundsOnce
- PlayAllSounds
- PlayAllSoundsLoop
- PlayAllSoundsOnce
- PlayAllStopped3DSounds
- PlayAllStopped3DSoundsLoop
- PlayAllStopped3DSoundsOnce
- PlayAllStoppedAmbientSounds
- PlayAllStoppedAmbientSoundsLoop
- PlayAllStoppedAmbientSoundsOnce
- PlayAllStoppedResourceSounds
- PlayAllStoppedResourceSoundsLoop
- PlayAllStoppedResourceSoundsOnce
- PlayAllStoppedSounds
- PlayAllStoppedSoundsLoop
- PlayAllStoppedSoundsOnce
- PlayResourceSound
- PlayResourceSoundLoop
- PlayResourceSoundOnce
- PlaySound
- PlaySoundLoop
- PlaySoundOnce
- PlayVideo
- PlayVideoLoop
- PlayVideoOnce
- PrintConsole
R
- ReadBoolVariableFromFile
- ReadFloatVariableFromFile
- ReadIntVariableFromFile
- ReadStringVariableFromFile
- RemoveCyclicAnimation
- RemoveFile
- RemoveFolder
- RemoveNonCyclicAnimation
- ResumeAllAnimationsOfPrefabInstances
- ResumeAllUpdateEvents
- ResumeAnimationOfAllWaters
- ResumeGame
- ResumeMainCharacterAnimations
- ResumePhysics
- ResumePrefabInstanceAnimations
- ResumeUpdateEventOf3DSound
- ResumeUpdateEventOfAll3DSounds
- ResumeUpdateEventOfAllAmbientSounds
- ResumeUpdateEventOfAllEngineCameras
- ResumeUpdateEventOfAllLights
- ResumeUpdateEventOfAllPrefabInstances
- ResumeUpdateEventOfAllWaters
- ResumeUpdateEventOfAmbientSound
- ResumeUpdateEventOfEngineCamera
- ResumeUpdateEventOfLight
- ResumeUpdateEventOfMainCharacter
- ResumeUpdateEventOfPrefabInstance
- ResumeUpdateEventOfSky
- ResumeUpdateEventOfTerrain
- ResumeUpdateEventOfVSceneScript
- ResumeUpdateEventOfWater
- ResumeWaterAnimation
- ReverseExecuteNonCyclicAnimation
- RotatePrefabInstance
S
- SaveGeneralProperties
- ScaleGUIButton
- ScaleGUIImage
- ScalePrefabInstance
- SelectPrefabInstances
- Set3DSoundScriptBoolVariable
- Set3DSoundScriptDoubleVariable
- Set3DSoundScriptIntVariable
- Set3DSoundScriptStringVariable
- SetAmbientSoundScriptBoolVariable
- SetAmbientSoundScriptDoubleVariable
- SetAmbientSoundScriptIntVariable
- SetAmbientSoundScriptStringVariable
- SetAnisotropicFilteringValue
- SetBloomColor
- SetBloomIntensity
- SetCameraScriptBoolVariable
- SetCameraScriptDoubleVariable
- SetCameraScriptIntVariable
- SetCameraScriptStringVariable
- SetCharacterControllerCapsuleHeight
- SetCharacterControllerCapsuleRadius
- SetCharacterControllerForcePower
- SetCharacterControllerJumpPower
- SetCharacterControllerPosition
- SetCharacterControllerRunSpeed
- SetCharacterControllerStepOffset
- SetCharacterControllerWalkSpeed
- SetDepthOfFieldFocalDistance
- SetDepthOfFieldFocalRange
- SetDirectionalShadowAlgorithm
- SetDirectionalShadowFarClipPlane
- SetDirectionalShadowIntensity
- SetDirectionalShadowLight
- SetDirectionalShadowNearClipPlane
- SetDirectionalShadowNumberOfSplits
- SetDirectionalShadowResolution
- SetDirectionalShadowWeightOfSplits
- SetDistanceBetweenPhysicsCameraAndCharacterController
- SetEngineCameraAngle
- SetEngineCameraFarClipPlane
- SetEngineCameraNearClipPlane
- SetEngineCameraPan
- SetEngineCameraPosition
- SetEngineCameraTilt
- SetFogColor
- SetFogDensity
- SetGlobalSoundVolume
- SetGUIButtonPosition
- SetGUIButtonScriptBoolVariable
- SetGUIButtonScriptDoubleVariable
- SetGUIButtonScriptIntVariable
- SetGUIButtonScriptStringVariable
- SetGUIImagePosition
- SetGUIPosition
- SetGUITextPosition
- SetLightAmbient
- SetLightDiffuse
- SetLightScriptBoolVariable
- SetLightScriptDoubleVariable
- SetLightScriptIntVariable
- SetLightScriptStringVariable
- SetLightShininess
- SetLightSpecular
- SetMainCharacterScriptBoolVariable
- SetMainCharacterScriptDoubleVariable
- SetMainCharacterScriptIntVariable
- SetMainCharacterScriptStringVariable
- SetMenuCursorSize
- SetMultisamplingValue
- SetPhysicsCameraAngle
- SetPhysicsCameraFarClipPlane
- SetPhysicsCameraMaxTilt
- SetPhysicsCameraMinTilt
- SetPhysicsCameraNearClipPlane
- SetPhysicsCameraTilt
- SetPhysicsCameraYaw
- SetPhysicsCollisionFlags
- SetPhysicsDefaultDynamicFriction
- SetPhysicsDefaultRestitution
- SetPhysicsDefaultSkinWidth
- SetPhysicsDefaultStaticFriction
- SetPhysicsGravity
- SetPhysicsGroundHeight
- SetPrefabInstanceAmbient
- SetPrefabInstanceDiffuse
- SetPrefabInstanceEmission
- SetPrefabInstanceScriptBoolVariable
- SetPrefabInstanceScriptDoubleVariable
- SetPrefabInstanceScriptIntVariable
- SetPrefabInstanceScriptStringVariable
- SetPrefabInstanceShininess
- SetPrefabInstanceSpecular
- SetPrefabInstanceTransparency
- SetScreenResolution
- SetSelectionDistance
- SetSkyPosition
- SetSkyScriptBoolVariable
- SetSkyScriptDoubleVariable
- SetSkyScriptIntVariable
- SetSkyScriptStringVariable
- SetSoundLoop
- SetSoundMaxDistance
- SetSoundPitch
- SetSoundPosition
- SetSoundReferenceDistance
- SetSoundRollOff
- SetSoundVolume
- SetTerrainAmbient
- SetTerrainDiffuse
- SetTerrainScriptBoolVariable
- SetTerrainScriptDoubleVariable
- SetTerrainScriptIntVariable
- SetTerrainScriptStringVariable
- SetTerrainShininess
- SetTerrainSpecular
- SetTriggerScriptBoolVariable
- SetTriggerScriptDoubleVariable
- SetTriggerScriptIntVariable
- SetTriggerScriptStringVariable
- SetVideoLoop
- SetVideoScriptBoolVariable
- SetVideoScriptDoubleVariable
- SetVideoScriptIntVariable
- SetVideoScriptStringVariable
- SetVideoVolume
- SetVSceneScriptBoolVariable
- SetVSceneScriptDoubleVariable
- SetVSceneScriptIntVariable
- SetVSceneScriptStringVariable
- SetWaterFlowSpeed
- SetWaterInvisible
- SetWaterLightPosition
- SetWaterPosition
- SetWaterRotation
- SetWaterScale
- SetWaterScriptBoolVariable
- SetWaterScriptDoubleVariable
- SetWaterScriptIntVariable
- SetWaterScriptStringVariable
- SetWaterTransparency
- SetWaterUnderwaterColor
- SetWaterUnderwaterFogDensity
- SetWaterUV
- SetWaterVisible
- ShowCursorIcon
- ShowGUI
- ShowGUIButton
- ShowGUIImage
- ShowGUIText
- ShowMenuCursor
- ShowPrefabInstance
- StopAll3DSounds
- StopAllAmbientSounds
- StopAllResourceSounds
- StopAllSounds
- StopResourceSound
- StopSound
- StopVideo