- Joined
- Jul 22, 2012
- Messages
- 72
Okay so I made 4 abilities. One being Aura (Change), the others being the abilities/buffs )Being Holy,Retribution, and Devotion). The Trigger I am trying to make allows the user to change between auras depending on what he wants. I tested it and it seems to not be working. It starts on Devotion Aura and gets stuck on it not allowing you to change. It doesn't even update the level of the spell either. So I was wondering if anyone could help me sort this out. This is my first more advanced trigger based on a spell on Hive Workshop.
-
Aura Setup
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- ------------------------------------------- --------
-
-------- Create Hashtable: --------
-
Custom script: set udg_Aura_Hash = InitHashtable()
-
-------- ------------------------------------------- --------
-
-------- When Caster's Aura change, the abilities below are the respective available Auras: --------
-
Set Presence_Ability_Aura[1] = Devotion Aura (Auras)
-
Set Presence_Ability_Aura[2] = Retribution Aura (Auras)
-
Set Presence_Ability_Aura[3] = Holy Aura (Aura)
-
-------- The indexes (of the abilities) above they should be COMPATIBLE with the indexes of Buffs. --------
-
-------- ------------------------------------------- --------
-
-------- Ability that allows to Caster, to change of Auras: --------
-
Set Aura_Ability_Change = Aura (Change)
-
-------- ------------------------------------------- --------
-
-------- The buffs below are necessary to change them instantly when Unit changes Aura. --------
-
Set Presence_Buff[1] = Devotion Aura
-
Set Presence_Buff[2] = Retribution Aura
-
Set Presence_Buff[3] = Holy Aura
-
-------- The indexes for buff and the indexes of the abilities (of the Auras) they should be compatible, for not happening mistakes. --------
-
-------- ------------------------------------------- --------
-
-------- Destroy this Trigger to improve the performance of the spell: --------
-
Custom script: call DestroyTrigger (GetTriggeringTrigger())
-
-------- ------------------------------------------- --------
-
-
-
Aura
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Aura (Change)
-
-
Actions
-
-------- ------------------------------------------- --------
-
-------- Caster (Unit that cast the spell): --------
-
Set Aura_Caster = (Triggering unit)
-
-------- ------------------------------------------- --------
-
-------- Load Caster's key in a handle: --------
-
Custom script: set udg_Aura_Handle = udg_Aura_Caster
-
-------- ------------------------------------------- --------
-
-------- Ability's level capable to change the presences: --------
-
Set Aura_Level = (Level of Aura (Change) for Aura_Caster)
-
-------- In this version it is not more necessary to verify the level of each Aura. --------
-
-------- ------------------------------------------- --------
-
-------- Load the index of the current Aura in Caster: --------
-
Set Aura_Index_Add = (Load 1 of (Key Aura_Handle) from Aura_Hash)
-
-------- The index will allow the change of Auras. --------
-
-------- ------------------------------------------- --------
-
-------- The variable "Presence_Index_Add" allows to choose the next Aura. --------
-
-------- The variable "Presence_Index_Remove" allows to remove the old Aura. --------
-
-------- ------------------------------------------- --------
-
-------- In the next steps, it is verified which Aura will be removed and which will be added. --------
-
Custom script: if udg_Aura_Index_Add == 0 then
-
-------- --------
-
-------- In case it is the first time that Caster chooses the Aura, choose a random Aura: --------
-
Custom script: set udg_Aura_Index_Add = GetRandomInt(1, 3)
-
-------- Be free to choose which will be the first Aura to be activated. --------
-
-------- --------
-
Custom script: else
-
Custom script: if udg_Aura_Index_Add >= 3 then
-
-------- --------
-
-------- In case the current Aura is Holy, change the Aura for Devotion: --------
-
Custom script: set udg_Aura_Index_Add = 1
-
Custom script: set udg_Aura_Index_Remove = 3
-
-------- In this section it means that the Aura reached a limit. --------
-
-------- --------
-
Custom script: else
-
-------- --------
-
-------- In case the Aura didn't reach the limit: --------
-
Custom script: set udg_Aura_Index_Remove = udg_Aura_Index_Add
-
Custom script: set udg_Aura_Index_Add = udg_Aura_Index_Add + 1
-
-------- --------
-
Custom script: endif
-
Custom script: endif
-
-------- ------------------------------------------- --------
-
-------- Save the index of the current Aura for Caster: --------
-
Hashtable - Save Aura_Index_Add as 1 of (Key Aura_Handle) in Aura_Hash
-
-------- Doesn't care Caster to die, the index will be the same until that Caster changes of Aura. --------
-
-------- ------------------------------------------- --------
-
-------- Remove the buff of the old Aura in Caster: --------
-
Unit - Remove Aura_Buff[Aura_Index_Remove] buff from Aura_Caster
-
-------- --------
-
-------- Remove the OLD Aura of Caster: --------
-
Unit - Remove Aura_Ability_Aura[Aura_Index_Remove] from Aura_Caster
-
-------- --------
-
-------- Add the NEW Aura for Caster: --------
-
Unit - Add Aura_Ability_Aura[Aura_Index_Add] to Aura_Caster
-
-------- --------
-
-------- Update the level of the NEW Aura for Caster: --------
-
Unit - Set level of Aura_Ability_Aura[Aura_Index_Add] for Aura_Caster to Aura_Level
-
-------- ------------------------------------------- --------
-
-------- The buff of the old Aura is removed instantly. --------
-
-------- But, the new Aura takes little time to update. --------
-
-------- ------------------------------------------- --------
-
-