Closed ohlidalp closed 1 year ago
The screenshot shows updated demo script bundled with the game. To run it, open console and say loadscript demo_script.as.
loadscript demo_script.as
New objects: SoundClass, SoundScriptTemplateClass, SoundScriptInstanceClass New enums: SoundTrigger, ModulationSource
SoundClass
SoundScriptTemplateClass
SoundScriptInstanceClass
SoundTrigger
ModulationSource
The principal interface is in the GameScriptClass (global object game):
GameScriptClass
game
array<SoundScriptTemplateClass@>@ getAllSoundScriptTemplates() SoundScriptTemplateClassPtr@ getSoundScriptTemplate(const string &in) array<SoundScriptInstanceClass@>@ getAllSoundScriptInstances() SoundClassPtr@ createSoundFromResource(const string &in filename, const string &in rg_name = string()) SoundScriptInstanceClassPtr@ createSoundScriptInstance(const string &in template, int actor_instance_id = -1)
I added a "sound follows player" checkbox to the 'demo_script.as' - you can use it to "pin" the sound to one place and run around to enjoy the spatial effect.
The screenshot shows updated demo script bundled with the game. To run it, open console and say
loadscript demo_script.as
.New objects:
SoundClass
,SoundScriptTemplateClass
,SoundScriptInstanceClass
New enums:SoundTrigger
,ModulationSource
The principal interface is in the
GameScriptClass
(global objectgame
):