- Joined
- Mar 27, 2011
- Messages
- 293
I want to create a trigger that, when it is not available for use, appearing on a sound and error message. But my concern now is not with the message, but with the sound.
I'll explain: suppose that can not trigger the spell from a distance, then an error sound appearing on, but when it should appear again, he does not appear.
See my triggers:
Thank you for attention, and if you can, leave your contribution!

I'll explain: suppose that can not trigger the spell from a distance, then an error sound appearing on, but when it should appear again, he does not appear.
See my triggers:
-
Spell
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Spell_Ability
-
-
Actions
-
-------- --------
-
Set Spell_Caster = (Triggering unit)
-
Custom script: set udg_Spell_Handle = udg_Spell_Caster
-
Set Spell_Charge_X = (Load 1 of (Key Spell_Handle) from Spell_Hash)
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Spell_Charge_X Not equal to Spell_Charge_Max
-
-
Then - Actions
-
-------- --------
-
Hashtable - Save 0.00 as 0 of (Key Spell_Handle) in Spell_Hash
-
Hashtable - Save (Spell_Charge_X + 1) as 1 of (Key Spell_Handle) in Spell_Hash
-
-------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Spell_Caster is in Spell_Group) Equal to True
-
-
Then - Actions
-
Else - Actions
-
Set Spell_Group_Count = (Spell_Group_Count + 1)
-
Unit Group - Add Spell_Caster to Spell_Group
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Spell Loop <gen> is on) Equal to True
-
-
Then - Actions
-
Else - Actions
-
Trigger - Turn on Spell Loop <gen>
-
-
-
-
-
-------- --------
-
-
Else - Actions
-
-------- --------
-
Set Spell_Level = (Level of Spell_Ability for Spell_Caster)
-
-------- --------
-
Unit - Remove Spell_Ability from Spell_Caster
-
Unit - Add Spell_Ability to Spell_Caster
-
Unit - Set level of Spell_Ability for Spell_Caster to Spell_Level
-
-------- --------
-
Custom script: if udg_Spell_Sound == null then
-
Custom script: set udg_Spell_Sound = CreateSoundFromLabel( "InterfaceError",false,false,false,10,10)
-
Custom script: call StartSound(udg_Spell_Sound)
-
Custom script: endif
-
-------- --------
-
-
-
-------- --------
-
-
Thank you for attention, and if you can, leave your contribution!

