Both sides previous revision Previous revision | Next revision Both sides next revision | ||
hpl1:documentation:script_reference [2012/08/29 14:43] ganjalf TeleportPlayer(ToArea) doestn works, i deletet ToArea and it works. |
hpl1:documentation:script_reference [2018/05/06 16:59] abion47 [Audio] |
||
---|---|---|---|
Line 213: | Line 213: | ||
==== Audio ==== | ==== Audio ==== | ||
- | + | <code c++> | |
- | <code c++>void CreateSoundEntity(std::string asName, std::string asFile, std::string asArea) | + | void CreateSoundEntity(std::string asName, std::string asFile, std::string asArea) |
</code> | </code> | ||
+ | Creates a sound entity at the postion of an area.\\ | ||
+ | asName Name of the created sound entity.\\ | ||
+ | asFile The snt file to load.\\ | ||
+ | asArea The area to create at. | ||
- | Creates a sound entity at the postion of an area.\\ | + | <code c++> |
- | asName Name of the created sound entity.\\ | + | void CreateSoundEntityAt(std::string asType,std::string asDestName, |
- | asFile The snt file to load.\\ | + | |
- | asArea The area to create at.\\ | + | |
- | <code c++>void CreateSoundEntityAt(std::string asType,std::string asDestName, | + | |
std::string asSoundName,std::string asSoundFile); | std::string asSoundName,std::string asSoundFile); | ||
</code> | </code> | ||
+ | Creates a sound entity at the position of an entity.\\ | ||
+ | asType The type of entity. This can be: "Joint","Body" or "Entity".\\ | ||
+ | asDestName The entity/body/joint name\\ | ||
+ | asSoundName The name of created sound entity.\\ | ||
+ | asSoundFile The name of the snt file. | ||
- | Creates a sound entity at the position of an entity.\\ | + | <code c++> |
- | asType The type of entity. This can be: "Joint","Body" or "Entity".\\ | + | void PlaySoundEntity(std::string asName, bool abPlayStart) |
- | asDestName The entity/body/joint name\\ | + | |
- | asSoundName The name of created sound entity.\\ | + | |
- | asSoundFile The name of the snt file.\\ | + | |
- | <code c++>void PlaySoundEntity(std::string asName, bool abPlayStart) | + | |
</code> | </code> | ||
+ | Play a sound entity\\ | ||
+ | asName The entity name\\ | ||
+ | abPlayStart If the start sound should be played. | ||
- | Play a sound entity\\ | + | <code c++> |
- | asName The entity name\\ | + | void StopSoundEntity(std::string asName, bool abPlayEnd) |
- | abPlayStart If the start sound should be played.\\ | + | |
- | <code c++>void StopSoundEntity(std::string asName, bool abPlayEnd) | + | |
</code> | </code> | ||
+ | Stop a sound entity\\ | ||
+ | asName The entity name\\ | ||
+ | abPlayEnd If the end sound should be played. | ||
- | Stop a sound entity\\ | + | <code c++> |
- | asName The entity name\\ | + | void FadeInSoundEntity(std::string asName, float afSpeed) |
- | abPlayEnd If the end sound should be played.\\ | + | |
- | <code c++>void FadeInSoundEntity(std::string asName, float afSpeed) | + | |
</code> | </code> | ||
+ | Play a sound entity fading it\\ | ||
+ | asName The entity name\\ | ||
+ | afSpeed Volume increase per second. | ||
- | Play a sound entity fading it\\ | + | <code c++> |
- | asName The entity name\\ | + | void FadeOutSoundEntity(std::string asName, float afSpeed) |
- | afSpeed Volume increase per second.\\ | + | |
- | <code c++>void FadeOutSoundEntity(std::string asName, float afSpeed) | + | |
</code> | </code> | ||
+ | Stop a sound entity fading it\\ | ||
+ | asName The entity name\\ | ||
+ | afSpeed Volume decrease per second. | ||
- | Stop a sound entity fading it\\ | + | <code c++> |
- | asName The entity name\\ | + | void PlayMusic(std::string asName, float afVol, float afStepSize, bool abLoop) |
- | afSpeed Volume decrease per second.\\ | + | |
- | <code c++>void PlayMusic(std::string asName, float afVol, float afStepSize, bool abLoop) | + | |
</code> | </code> | ||
+ | Play music track.\\ | ||
+ | asName Name of the music file.\\ | ||
+ | afVol Volume of the music\\ | ||
+ | afStepSize The increase in volume per second when fading in. | ||
- | Play music track.\\ | + | <code c++> |
- | asName Name of the music file.\\ | + | void StopMusic(float afStepSize) |
- | afVol Volume of the music\\ | + | |
- | afStepSize The increase in volume per second when fading in.\\ | + | |
- | <code c++>void StopMusic(float afStepSize) | + | |
</code> | </code> | ||
+ | Stop music track.\\ | ||
+ | afStepSize The decrease in volume per second when fading out. | ||
- | Stop music track.\\ | ||
- | afStepSize The decrease in volume per second when fading out.\\ | ||
<code c++> | <code c++> | ||
PlayGameMusic(string asFile, float afVolume,float afFadeStep,bool abLoop, int alPrio); | PlayGameMusic(string asFile, float afVolume,float afFadeStep,bool abLoop, int alPrio); | ||
</code> | </code> | ||
+ | Play music track with prio, added to episode 1 to be able to play different tracks that mix in and out depending on prio.\\ | ||
+ | asFile The name of the music file.\\ | ||
+ | afVolume The volume to play the music at 0 to 1.\\ | ||
+ | afFadeStep The decrease in volume per second when fading out.\\ | ||
+ | abLoop If the music should loop.\\ | ||
+ | alPrio The priority of the track, 0 to 10. A higher numbers fades a lower number out, if you have an ambient music track using prio 0 it will fade out if you add a music track to an enemy entity with prio 1 and the enemy attacks the player. When the attack is over the ambient track will fade back in. | ||
- | Play music track with prio, added to episode 1 to be able to play different tracks that mix in and out depending on prio.\\ | ||
- | asFile The name of the music file.\\ | ||
- | afVolume The volume to play the music at 0 to 1.\\ | ||
- | afFadeStep The decrease in volume per second when fading out.\\ | ||
- | abLoop If the music should loop.\\ | ||
- | alPrio The priority of the track, 0 to 10. A higher numbers fades a lower number out, if you have an ambient music track using prio 0 it will fade out if you add a music track to an enemy entity with prio 1 and the enemy attacks the player. When the attack is over the ambient track will fade back in.\\ | ||
<code c++> | <code c++> | ||
StopGameMusic(float afFadeStep, int alPrio); | StopGameMusic(float afFadeStep, int alPrio); | ||
</code> | </code> | ||
+ | Stop game music track with prio.\\ | ||
+ | afFadeStepThe decrease in volume per second when fading out.\\ | ||
+ | alPrio priority of the music track. | ||
- | Stop game music track with prio.\\ | + | <code c++> |
- | afFadeStepThe decrease in volume per second when fading out.\\ | + | void PlayGuiSound(std::string asName, float afVol) |
- | alPrio priority of the music track.\\ | + | |
- | <code c++>void PlayGuiSound(std::string asName, float afVol) | + | |
</code> | </code> | ||
+ | Play a sound gui sound, with out any position.\\ | ||
+ | asName The sound name\\ | ||
+ | afVol Volume of the sound\\ | ||
- | Play a sound gui sound, with out any position.\\ | ||
- | asName The sound name\\ | ||
- | afVol Volume of the sound\\ | ||
- | \\ | ||
==== Physics ==== | ==== Physics ==== | ||