well what i try to do is a simple trigger that works like this: when any of the players say "hi" it will play sound [insert sound here]. now i know how to work with the sound meneger... my problem is doing the trigger itself, i mean when at the event part in the option of "player types text" there are 50 options like sub-string and contrtive (something like that)... i need someone to guide me. thanks alot for your help (sorry if my english is bad)
You wanna have it that if any player tipes "hi" it plays that sound? This trigger here works for every player.
Events Player - Player 1 (Red) types a chat message containing hi as An exact match Player - Player 2 (Blue) types a chat message containing hi as An exact match Player - Player 3 (Teal) types a chat message containing hi as An exact match Player - Player 4 (Purple) types a chat message containing hi as An exact match Player - Player 5 (Yellow) types a chat message containing hi as An exact match Player - Player 6 (Orange) types a chat message containing hi as An exact match Player - Player 7 (Green) types a chat message containing hi as An exact match Player - Player 8 (Pink) types a chat message containing hi as An exact match Player - Player 9 (Gray) types a chat message containing hi as An exact match Player - Player 10 (Light Blue) types a chat message containing hi as An exact match Player - Player 11 (Dark Green) types a chat message containing hi as An exact match Player - Player 12 (Brown) types a chat message containing hi as An exact match Conditions Actions Sound - Play [Your Sound]
Create a integer variable (here I named it SoundChooser)
for example I have three sounds Sound#1 Sound#2 Sound#3
then create this trigger
Actions Set SoundChooser = (Random integer number between 1 and 10)
perhaps here you need to add a small wait action
If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions SoundChooser Equal to 1 Then - Actions Sound - Play Sound#1 Else - Actions [list]If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions SoundChooser Equal to 2 Then - Actions Sound - Play Sound#2 Else - Actions [list]If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions SoundChooser Equal to 3 Then - Actions Sound - Play Sound#3 Else - Actions
Hmm... The only problem with Panto's method is that you have to create many variables... In DarkShadow's, you can just use a variable called Random for every random choose, because it changes every time anyway...
Actually, it's one variable array, which is defined one time, at the beginning of the map, when you define each the possible random sounds. There's not even a variable needing to be set inside the trigger that plays the sound.
Arranging actions so that as few run as possible is one of the key parts of cutting down processor intensity and reducing map lag.
I meant if you use many different random actions in one map, then it can be quite annoying to create all those variables, but if you only have 1 or 2 different actions of this kind in your map, then you should do it Panto's way.
No, you need one variable for every type of random-chooser. You can't use a sound variable to a random unit-type, you have to create many different ones, that can make the other way more handy, because that'a only one integer variable. You're also more free with an IF/then/else chooser, like:
Set Random = Random Integer Value between 1 and 3.
If Random Equal to 1 then do Unit - Create 1 footman at random point in playable map area.
If Random Equal to 2 then do Unit - Create 2 zergling at centre of Region 001.
If Random Equal to 3 then do Unit - Create Random integer number between 2 and 3footman at Position of Random unit in playable Map area offset by 200 facing Random integer value between 240 and 260 degrees.
Now, this would require a variable for every bolded value, and it would also need an Integer Random chooser for the array anyway...