#2, by afrlmeFriday, 14. July 2017, 16:38 8 years ago
There was 2 additional volume channels added into Visionaire Studio 4.x. eGlobalVolume & eMovieVolume. The global volume channel is essentially the master volume channel that all the different volume channels are linked to, so you could easily toggle it like so...
1. create a key action for "m (released)" - note the released bit, it's important. 2. inside of that action create an execute a script action part & add this block of code to it...
if getVolume(eGlobalVolume) > 0 then
setVolume(eGlobalVolume, 0)
else
setVolume(eGlobalVolume, 100)
end
#4, by afrlmeFriday, 14. July 2017, 19:22 8 years ago
Key (released) only triggers the actions once the player lets go of the key, whereas the regular key actions work like the turbo button on a gamepad; in other words if you use a regular key action, then it ends up looping through the actions indefinitely while the player is keeping the key pushed down which isn't a good thing if the actions are saving something or are toggling between one thing & another.
Example. Let's say you are using ESC to toggle between the main menu & also to switch back to the previous scene, now because you are toggling between the two scenes it will keep switching between them until the player lets go.
Regular key press would be more desired for say sliding something out or moving a character. Anyway... I always recommend using Key (released) key events unless a situation requires the regular key event type.