My mistake I should've made that more clear. TempInteger is used for the What sounds.
The Pissed variables are the only thing you need to change.
Hi Uncle, the triggers you helped me with are working great but I am a little
bit stuck because I want to make another trigger exactly the same for another
unit so what I did was by (Map Initialization) where it sets the variables I
created additional exactly the same type of variables and named them according
to the unit like (SelectSoundsFootman) etc, as for the rest of the variables I
just used the ones that are already there, so is that right?
And the problem that I am having is with the trigger for selecting it works fine
and if I click repeatedly it goes through the what sounds and then the pissed
sounds like it is supposed to but when the pissed sounds are finished if I keep
clicking it is silent for long like 10 or 30 seconds then it repeats the pissed sounds
again which is what it is supposed to do excepting for that long pause in between,
I have pasted my two triggers below then maybe you can show me where did I go
wrong. For the first one that I did with your help it is working perfectly I’m only
picking the problem up on this one. And I have not done the sounds for
the attack and move order yet but I’ll try those on my own first, ok thanks.
Trigger 01
Events
Map initialization
Conditions
Actions
Set ArcherSelectSound[1] = Elvan_Archer_Selected_01 <gen>
Set ArcherSelectSound[2] = Elvan_Archer_Selected_02 <gen>
Set ArcherSelectSound[3] = Elvan_Archer_Selected_03 <gen>
Set ArcherSelectSound[4] = Elvan_Archer_Selected_04 <gen>
Set ArcherSelectDuration[1] = 1.10
Set ArcherSelectDuration[2] = 1.20
Set ArcherSelectDuration[3] = 1.50
Set ArcherSelectDuration[4] = 1.50
-------- --------
Set ArcherMoveSound[1] = Elvan_Archer_Acknowledgement_01 <gen>
Set ArcherMoveSound[2] = Elvan_Archer_Acknowledgement_02 <gen>
-------- --------
Set ArcherAttackSound[1] = Elvan_Archer_Acknowledgement_03 <gen>
Set ArcherAttackSound[2] = Elvan_Archer_Acknowledgement_04 <gen>
-------- --------
Set ArcherPissedSound[1] = Elvan_Archer_Annoyed_01 <gen>
Set ArcherPissedSound[2] = Elvan_Archer_Annoyed_02 <gen>
Set ArcherPissedSound[3] = Elvan_Archer_Annoyed_03 <gen>
Set ArcherPissedDuration[1] = 2.10
Set ArcherPissedDuration[2] = 2.70
Set ArcherPissedDuration[3] = 3.10
Trigger 02
Events
Player - Player 1 (Red) Selects a unit
Player - Player 2 (Blue) Selects a unit
Player - Player 3 (Teal) Selects a unit
Player - Player 4 (Purple) Selects a unit
Conditions
PreventSounds[(Player number of (Triggering player))] Equal to False
(Unit-type of (Triggering unit)) Equal to My Unit
Actions
Set PN = (Player number of (Triggering player))
-------- --------
Set PreventSounds[PN] = True
Set PissedCounter[PN] = (PissedCounter[PN] + 1)
Set SelectCounterNew[PN] = (SelectCounterNew[PN] + 1)
Set TempPlayer = (Triggering player)
Set TempSound = No sound
-------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PissedCounter[PN] Less than 6
Then - Actions
-------- What --------
Set TempInteger = (Random integer number between 1 and 4)
Set SoundDuration = ArcherSelectDuration[TempInteger]
Custom script: if GetLocalPlayer() == udg_TempPlayer then
Set TempSound = ArcherSelectSound[TempInteger]
Sound - Play TempSound at 100.00% volume, attached to (Triggering unit)
Custom script: endif
Else - Actions
-------- Pissed --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
PissedStory[PN] Less than 5
Then - Actions
Set PissedStory[PN] = (PissedStory[PN] + 1)
Else - Actions
Set PissedStory[PN] = 1
Set SoundDuration = PissedDuration[PissedStory[PN]]
Custom script: if GetLocalPlayer() == udg_TempPlayer then
Set TempSound = ArcherPissedSound[PissedStory[PN]]
Sound - Play TempSound at 100.00% volume, attached to (Triggering unit)
Custom script: endif
-------- --------
Wait SoundDuration seconds
Set PN = (Player number of (Owner of (Triggering unit)))
Set PreventSounds[PN] = False
Wait 1.00 seconds
Set PN = (Player number of (Owner of (Triggering unit)))
Set SelectCounterOld[PN] = (SelectCounterOld[PN] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SelectCounterNew[PN] Equal to SelectCounterOld[PN]
Then - Actions
Set PissedCounter[PN] = 0
Set PissedStory[PN] = 0
Else - Actions