File Path Convention in Scripting

1. start with ' \ ' means relative path; the program will add corresponding resource path in front.

2. otherwise (the first character is not ' \ '), means absolute path; the program will directly use path to find file.

resource paths list:

 Resource Type  Typical File Exts  Path  Explain
 Shader Text  .sha, .txt  effects shader text used in material, see Shader Text
 Model  .tri, .ani  models you can use .tri file to create mobile, skinmesh; and use .ani file to create bonesani
 Script  .lua, .txt  scripts this folder stores system script files; your own script files can placed anywhere
 Sound  .wav, .mid  sounds you can play sound files use the PlaySound() function
 Texture  .jpg, .bmp, .tga  textures you can use the texturelist.addTexture() function to load image file

Example :

PlaySound('\\buttonover.wav') -- play the "...\sounds\buttonover.wav" file
PlaySound('c:\\buttonover.wav') -- play the "c:\buttonover.wav" file
local t=texturelist.addTexture('\\trees.tga') -- load the "...\textures\trees.tga" file
local mov=scene.createMobile('\\dolphin.tri') -- create a mobile from the "...\models\dolphin.tri" file

กก