Do not mess around GlobalSounds, and need to clarify something about.
I am working on a conversation system in GG.
At the moment I am testing with the player, a man, and a woman in the same map; Both have their own script attached.
The script of the man loads the sounds (voices) as follows:
LoadGlobalSound (mysound.wav, 1)
LoadGlobalSound (mysound1.wav, 2)
LoadGlobalSound (mysound2.wav, 3)
And the woman's script:
LoadGlobalSound (mysound3.wav, 1)
LoadGlobalSound (mysound4.wav, 2)
LoadGlobalSound (mysound5.wav, 3)
Note: Notice slots, in both cases they are going from 1 to 3.
The man's script loads 3 buttons (sprites) and the mouse, after pressing the "E" key.
The player selects the text (button) and gets the corresponding question and answer.
The woman's script does the same but using the keyboard.
If the player presses the numeric key "1" he will get the question and answer number 1, and so on.
At the moment I have only applied the mouse, to the script of the man.
ISSUE
When I execute the man script (distance based), I press the "E" key, select a button and press the left mouse button,
The text changes color as expected, but I get a mix of sounds, that is, the player's question with the woman's answer.
First reaction was a surprise, as it is not possible, due the woman's sounds are executed by means of keys and not through the mouse.
QUESTION
Are the slots used by GlobalSound () on the same map are inclusive between them?
That is, if a script1 declares:
LoadGlobalSound (mysound.wav, 1)
LoadGlobalSound (mysound1.wav, 2)
LoadGlobalSound (mysound2.wav, 3)
A script2 on the same map should state:
LoadGlobalSound (mysound.wav, 4)
LoadGlobalSound (mysound1.wav, 5)
LoadGlobalSound (mysound2.wav, 6)
Tha's the right way, in order to avoid the mistake?
Note1: Notice slot going from 1 to 6.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz
OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4
The author of this post has marked a post as an answer.
Go to answer