- Joined
- Dec 16, 2017
- Messages
- 376
Hello guys, i am trying to ease things when making spells in my map, as 1 hero has 4 jobs, each job 1 and 2 have 4 spells, job 3 and job 4 have 3 spells, after each job completed, the next one has the last jobs spells in a spellbook, so for each spell of jobs 1-2-3, i use 2 spells(as i found a little trick to ease things, instead of making 4 spells for 1 type of spell for each job, i just do 2,and level them accordingly), one is hero ability and one is unit ability(that i level to match the job), so a job 4 fully leveled has 1 spellbook of 11 spells and 3 units abilities.
Now, for more triggered spells, i would like to do something, that i tried but didn't seemed to work.. i want to create 2 abilities for one trigger, but what condition shall i use? For this, each caster is different, because the 2 abilities are, one the hero ability, and the other one the unit ability...i want to change dmg and duration of this spell, how shall i do it properly, as what condition to trigger it? it can be trigger by 2 different units, like job 3 and job 4 of magician, each player can have just one type of those units, but more players can have the same unit.
The Mammonite job 1 spell is the hero ability that is leveled up to 5 levels (but in the case of this spell, i just use it to take gold from triggers, because the damage is done via object editor) and the Mammonite Job 2 spell is the unit ability that has 3 levels, level 1 = job 2, level 2 = job 3, level 3 = job 4, and i level up the spell accordingly of what type of unit has it with triggers like:
Now, for more triggered spells, i would like to do something, that i tried but didn't seemed to work.. i want to create 2 abilities for one trigger, but what condition shall i use? For this, each caster is different, because the 2 abilities are, one the hero ability, and the other one the unit ability...i want to change dmg and duration of this spell, how shall i do it properly, as what condition to trigger it? it can be trigger by 2 different units, like job 3 and job 4 of magician, each player can have just one type of those units, but more players can have the same unit.
-
Sleet Storm Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Sleet Storm Magician Job 4
-
Actions
- Set SleetStorm_Index = (SleetStorm_Index + 1)
- Set SleetStorm_Caster[SleetStorm_Index] = (Triggering unit)
- Set SleetStorm_Position[SleetStorm_Index] = (Target point of ability being cast)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Sleet Storm Magician Job 4
-
Then - Actions
- Set SleetStorm_Damage[SleetStorm_Index] = ((0.75 x (Real((Level of (Ability being cast) for SleetStorm_Caster[SleetStorm_Index])))) x (Real((Intelligence of SleetStorm_Caster[SleetStorm_Index] (Include bonuses)))))
- Set SleetStorm_Duration[SleetStorm_Index] = (8 + (4 x (Level of (Ability being cast) for SleetStorm_Caster[SleetStorm_Index])))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Sleet Storm Magician Job 3
-
Then - Actions
- Set SleetStorm_Damage[SleetStorm_Index] = ((2.00 x (Real((Level of (Ability being cast) for SleetStorm_Caster[SleetStorm_Index])))) x (Real((Intelligence of SleetStorm_Caster[SleetStorm_Index] (Include bonuses)))))
- Set SleetStorm_Duration[SleetStorm_Index] = (12 + (4 x (Level of (Ability being cast) for SleetStorm_Caster[SleetStorm_Index])))
- Else - Actions
-
If - Conditions
- Unit - Create 1 Dummy Empty for (Owner of SleetStorm_Caster[SleetStorm_Index]) at SleetStorm_Position[SleetStorm_Index] facing Default building facing degrees
- Set SleetStorm_Dummy[SleetStorm_Index] = (Last created unit)
- Special Effect - Create a special effect attached to the origin of SleetStorm_Dummy[SleetStorm_Index] using Sleet Storm.mdx
- Set SleetStorm_SFX[SleetStorm_Index] = (Last created special effect)
- Animation - Change SleetStorm_Dummy[SleetStorm_Index]'s size to (300.00%, 300.00%, 300.00%) of its original size
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SleetStorm_Index Equal to 1
-
Then - Actions
- Trigger - Turn on Sleet Storm Loop <gen>
- Else - Actions
-
If - Conditions
-
Events
-
Sleet Storm Loop
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
For each (Integer SleetStorm_Loop) from 1 to SleetStorm_Index, do (Actions)
-
Loop - Actions
- Set SleetStorm_Duration[SleetStorm_Loop] = (SleetStorm_Duration[SleetStorm_Loop] - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SleetStorm_Duration[SleetStorm_Loop] Greater than or equal to 0
- (SleetStorm_Caster[SleetStorm_Loop] is alive) Equal to True
-
Then - Actions
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 500.00 of SleetStorm_Position[SleetStorm_Loop]) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is alive) Equal to True
- ((Picked unit) belongs to an enemy of (Owner of SleetStorm_Caster[SleetStorm_Loop])) Equal to True
-
Then - Actions
- Unit - Cause SleetStorm_Caster[SleetStorm_Loop] to damage (Picked unit), dealing SleetStorm_Damage[SleetStorm_Loop] damage of attack type Spells and damage type Normal
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\LichMissile\LichMissile.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Else - Actions
- Special Effect - Destroy SleetStorm_SFX[SleetStorm_Loop]
- Custom script: call RemoveLocation(udg_SleetStorm_Position[udg_SleetStorm_Loop])
- Unit - Add a 0.10 second Generic expiration timer to SleetStorm_Dummy[SleetStorm_Loop]
- Set SleetStorm_Position[SleetStorm_Loop] = SleetStorm_Position[SleetStorm_Index]
- Set SleetStorm_Caster[SleetStorm_Loop] = SleetStorm_Caster[SleetStorm_Index]
- Set SleetStorm_Damage[SleetStorm_Loop] = SleetStorm_Damage[SleetStorm_Index]
- Set SleetStorm_Dummy[SleetStorm_Loop] = SleetStorm_Dummy[SleetStorm_Index]
- Set SleetStorm_Duration[SleetStorm_Loop] = SleetStorm_Duration[SleetStorm_Index]
- Set SleetStorm_SFX[SleetStorm_Loop] = SleetStorm_SFX[SleetStorm_Index]
- Set SleetStorm_Index = (SleetStorm_Index - 1)
- Set SleetStorm_Loop = (SleetStorm_Loop - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SleetStorm_Index Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
If - Conditions
-
Loop - Actions
-
For each (Integer SleetStorm_Loop) from 1 to SleetStorm_Index, do (Actions)
-
Events
The Mammonite job 1 spell is the hero ability that is leveled up to 5 levels (but in the case of this spell, i just use it to take gold from triggers, because the damage is done via object editor) and the Mammonite Job 2 spell is the unit ability that has 3 levels, level 1 = job 2, level 2 = job 3, level 3 = job 4, and i level up the spell accordingly of what type of unit has it with triggers like:
-
Warlord Spellbook Increase
-
Events
- Unit - A unit enters (Playable map area)
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Entering unit)) Equal to |c00E56717[Warlord] - |c00DB7093[Job 3]|r
-
Then - Actions
- Unit - Set level of Sword Strike Warlord Job 234 for (Entering unit) to 2
- Unit - Set level of Taunt Warlord Job 234 for (Entering unit) to 2
- Unit - Set level of Anciestry Awaken Warlord Job 234 for (Entering unit) to 2
- Unit - Set level of Armor of Steel Warlord Job 234 for (Entering unit) to 2
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Entering unit)) Equal to |c00E56717[Warlord] - |c00FF00FF[Job 4]|r
-
Then - Actions
- Unit - Set level of Sword Strike Warlord Job 234 for (Entering unit) to 3
- Unit - Set level of Taunt Warlord Job 234 for (Entering unit) to 3
- Unit - Set level of Anciestry Awaken Warlord Job 234 for (Entering unit) to 3
- Unit - Set level of Armor of Steel Warlord Job 234 for (Entering unit) to 3
- Unit - Set level of Linked Blood Warlord Job 34 for (Entering unit) to 2
- Unit - Set level of War Frenzy Warlord Job 34 for (Entering unit) to 2
- Unit - Set level of Shockwave Warlord Job 34 for (Entering unit) to 2
- Unit - Set level of Ancient Fear Warlord Job 34 for (Entering unit) to 2
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Mammonite Job 1234
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Ability being cast) Equal to Mammonite Merchant Job 1
- (Ability being cast) Equal to Mammonite Merchant Job 2
-
Conditions
-
Or - Any (Conditions) are true
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Mammonite Merchant Job 1
- ((Owner of (Triggering unit)) Current gold) Less than 300
-
Then - Actions
- Unit - Order (Triggering unit) to Stop
-
Else - Actions
- Player - Add -300 to (Owner of (Triggering unit)) Current gold
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Mammonite Merchant Job 2
- (Level of Mammonite Merchant Job 2 for (Triggering unit)) Equal to 1
- ((Owner of (Triggering unit)) Current gold) Less than 500
-
Then - Actions
- Unit - Order (Triggering unit) to Stop
-
Else - Actions
- Player - Add -500 to (Owner of (Triggering unit)) Current gold
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Mammonite Merchant Job 2
- (Level of Mammonite Merchant Job 2 for (Triggering unit)) Equal to 2
- ((Owner of (Triggering unit)) Current gold) Less than 700
-
Then - Actions
- Unit - Order (Triggering unit) to Stop
-
Else - Actions
- Player - Add -700 to (Owner of (Triggering unit)) Current gold
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to Mammonite Merchant Job 2
- (Level of Mammonite Merchant Job 2 for (Triggering unit)) Equal to 3
- ((Owner of (Triggering unit)) Current gold) Less than 900
-
Then - Actions
- Unit - Order (Triggering unit) to Stop
-
Else - Actions
- Player - Add -900 to (Owner of (Triggering unit)) Current gold
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Last edited: