• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Spell not working!

Status
Not open for further replies.
Level 13
Joined
Dec 21, 2010
Messages
541
I'm having a problem with my spells...
I made my own trigger of Epicenter and Requiem of Souls from Dota

When the Epicenter is used.. there will be a unit that will cast thunderclap per second

It works fine when a player - user used the ability but when a player- computer uses the ability, the thunderclap is not working...

[trigger=Cast]EC Cast
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Epicenter
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EC_Mui[0] Equal to 0
Then - Actions
Trigger - Turn on EC Loop <gen>
Else - Actions
Set EC_Mui[0] = (EC_Mui[0] +1)
Set EC_Mui[1] = (EC_Mui[1] +1)
Set EC_Pulse[EC_Mui[1]] = 0.00
Set EC_Caster[EC_Mui[1]] = (Triggering unit)
Set EC_Duration[EC_Mui[1]] = (2.00 + (1.00 x (Real((Level of Epicenter for EC_Caster[EC_Mui[1]])))))
Set EC_Size[EC_Mui[1]] = 80.00
Set EC_AoE[EC_Mui[1]] = 400.00




[/trigger]
[trigger=Loop]EC Loop
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
For each (Integer EC_Mui[2]) from 1 to EC_Mui[1], do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EC_Duration[EC_Mui[2]] Greater than 0.00
Then - Actions
Set EC_Duration[EC_Mui[2]] = (EC_Duration[EC_Mui[2]] - 0.02)
Set EC_Pulse[EC_Mui[2]] = (EC_Pulse[EC_Mui[2]] - 0.02)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EC_Pulse[EC_Mui[2]] Less than or equal to 0.00
Then - Actions
Set EC_Pulse[EC_Mui[2]] = 0.48
Set EC_Size[EC_Mui[2]] = (EC_Size[EC_Mui[2]] + 25.00)
Set EC_AoE[EC_Mui[2]] = (EC_AoE[EC_Mui[2]] + 50.00)
Set EC_Caster_Point[EC_Mui[2]] = (Position of EC_Caster[EC_Mui[2]])
Set EC_Group[EC_Mui[2]] = (Units within EC_AoE[EC_Mui[2]] of EC_Caster_Point[EC_Mui[2]] matching (((((Matching unit) is A structure) Not equal to True) and Matching unit) is Magic Immune) Not equal to True)) and ((((Matching unit is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of EC_Caster[EC_Mui[2]])) Equal to True))
Unit - Create 1 EC Dummy for (Owner of EC_Caster[EC_Mui[2]]) at EC_Caster_Point[EC_Mui[2]] facing Default building facing degrees
Animation - Change (Last created unit)'s size to (EC_Size[EC_Mui[2]]%, EC_Size[EC_Mui[2]]%, EC_Size[EC_Mui[2]]%) of its original size
Special Effect - Create a special effect at EC_Caster_Point[EC_Mui[2]] using war3mapImported\Epicenter.mdx
Special Effect - Destroy (Last created special effect)
Unit - Add EC Damage to (Last created unit)
Unit - Set level of EC Damage for (Last created unit) to (Level of Epicenter for EC_Caster[EC_Mui[2]])
Unit - Order (Last created unit) to Human Mountain King - THunder Clap
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Unit Group - Pick every unit in EC_Group[EC_Mui[2]] and do (Actions)
Loop - Actions
Unit - Cause EC_Caster[EC_Mui[2]] to damage (Picked unit), dealing 110 damage of attack type Spells and damage type Normal
Custom script: call DestroyGroup (udg_EC_Group[udg_EC_Mui[2]])
Custom script: call RemoveLocation (udg_EC_Caster_Point[udg_EC_Mui[2]])
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EC_Duration[EC_Mui[2]] Less than or equal to 0.00
Then - Actions
Set EC_Duation[EC_Mui[2]] = 0.00
Set EC_Mui[0] = (EC_Mui[0] -1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EC_Mui[0] Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Set EC_Mui[0] = 0
Set EC_Mui[1] = 0
Else - Actions
Else - Actions
Else - Actions

[/trigger]





And also the Requiem of Souls of Nevermore..
his ability is made out of carrion swarm in polar.. only when a player - computer uses the ability, the carrion swarm is not working .

[trigger=Learn]OS Learn
Events
Unit - A unit Learns a skill
Conditions
((Unit-type of (Learning Hero)) is A Hero) Equal to True
(Learned Hero Skill) Equal to Oversoul
(Level of Oversoul for (Learning Hero)) Equal to 1
((Owner of (learning Hero)) controller) Equal to Computer
((Learning Hero) is an illusion) Not equal to Ture
Actions
Set OS_Caster = (Learning Hero)
Set OS_Special = False
Trigger - Add to AI LS Oversoul <gen> the event (Unit - OS_Caster's life becomes Less than 30.00)
[/trigger]
[trigger=Cast]OS Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Oversoul
Actions
Set OS_Special = False
Set OS_Cast_Pos = (Position of OS_Caster)
Set OS_Level = Level of Soul Damage for OS_Caster)
Set OS_Ability_Level = (Level of Oversoul for OS_Caster)
Unit - Create 1 Soul 2 for (Owner of OS_Caster) at OS_Cast_Pos facing (Facing of OS_Caster) degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Animation - Play (Last created unit)'s spell animation
Animation - CHange (Last created unit)'s vertex coloring to (0.00%, 0.00%, 0.00%) with 50.00% transparency
For each (Integer OS_Count) from 1 to OS_Level, do (Actions)
Loop - Actions
Set OS_Real = ((360.00/(Real(OS_Level))) x (Real(OS_Count)))
Set OS_Temp_Pos = (OS_Cast_Pos offset by 30.00 towards OS_Real degrees)
Unit - Create 1 DB Dummy for (Owner of OS_Caster) at OS_Cast_Pos facing OS_Real degrees
Unit - Add OS Damage for (Last created unit)
Unit - Set level of OS Damage for (Last created unit) to OS_Ability_Level
Unit - Order (Last created unit to Undead Dreadlord - Carrion Swarm OS_Temp_Pos
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_OS_Temp_Pos)
Set Soul_Group = (Units within 800.00 of OS_Cast_Pos matching (((((Matching unit) is A structure) Not equal to True) and Matching unit) is Magic Immune) Not equal to True)) and ((((Matching unit is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of OS_Caster)) Equal to True))
Unit Group - Pick every unit in Soul_Group and do (Actions)
Loop - Actions
Set General_Point = (Position of (Picked unit))
Unit - Create 1 Generic Dummy for (Owner of OS_Caster) at General_Point facing Default building facing degrees
Unit - Add a 1.00 Generic expiration timer to (Last created unit)
Unit - Add Over Soul Slow (Dummy) for (Last created unit)
Unit - Set level of Over Soul Slow (Dummy) for (Last created unit) to OS_Ability_Level
Unit - Order (Last created unit) to Human Sorceress - Slow (Picked Unit)
Custom script: call RemoveLocation (udg_General_Point)
Custom script: call DestroyGroup (udg_Soul_Group)
Custom script: call RemoveLocation (udg_OS_Cast_Pos)
[/trigger]


. I don't really know what to do @_@
 
Last edited:
Status
Not open for further replies.
Top