Ayanami
칼리
- Reaction score
- 288
Basically, I'm trying to make a skill that knocks back an enemy when the enemy comes in range of the casting unit. For example, say A is the caster and B is the enemy unit. A casts the skill "Fervor Charge". The skill gives A a buff. If B goes near A while A has the "Fervor Charge Buff", B would be damaged and knocked back. I did make this skill, however, when another enemy unit C comes in range of A, B's knockback will be canceled mid-way. That's why I'm trying to convert my trigger into MUI. However, I just can't find a way to. Here are the triggers.
This trigger is to set the "CentaurGuardian" variable as the entering unit type "CentaurGuardian" which is needed for the trigger later.
Help would be appreciated and +rep. Thanks =D
Code:
Centaur Guardian (Initially On)
Events
Unit - A unit enters Hero Start <gen>
Conditions
(Unit-type of (Entering unit)) Equal to Centaur Guardian
Actions
Set CentaurGuardian = (Entering unit)
Code:
Fervor Charge Init (Initially On)
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Fervor Charge
Actions
Trigger - Add to Fervor Charge <gen> the event (Unit - A unit comes within 150.00 of CentaurGuardian)
Trigger - Turn on Fervor Charge <gen>
Wait 20.00 game-time seconds
Trigger - Turn off Fervor Charge <gen>
Trigger - Turn off Fervor Charge Force <gen>
Code:
Fervor Charge (Initially Off)
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
FCCV Less than 100
Then - Actions
Set FCCV = (FCCV + 1)
Else - Actions
Set FCCV = 1
Set FCCaster = CentaurGuardian
Set FCEnteringUnit[FCCV] = (Entering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
((Entering unit) is A structure) Not equal to True
((Entering unit) belongs to an enemy of (Owner of CentaurGuardian)) Equal to True
Then - Actions
Unit - Cause FCCaster to damage FCEnteringUnit[FCCV], dealing (((Real((Level of Fervor Charge for FSCaster))) x 70.00) + 70.00) damage of attack type Chaos and damage type Universal
Else - Actions
Trigger - Turn on Fervor Charge Force <gen>
Code:
Fervor Charge Force (Initially On)
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
Set FCCasterLoc = (Position of FCCaster)
Set FCEnteringUnitLoc1[FCCV] = (Position of FCEnteringUnit[FCCV])
Set FCEnteringUnitLoc2[FCCV] = (FCEnteringUnitLoc1[FCCV] offset by 10.00 towards (Angle from FCCasterLoc to FCEnteringUnitLoc1[FCCV]) degrees)
Set FCEnteringUnitLoc3[FCCV] = FCEnteringUnitLoc2[FCCV]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between FCCasterLoc and FCEnteringUnitLoc1[FCCV]) Greater than or equal to 240.00
Then - Actions
Else - Actions
Unit - Move FCEnteringUnit[FCCV] instantly to FCEnteringUnitLoc3[FCCV]
Special Effect - Create a special effect attached to the origin of FCEnteringUnit[FCCV] using Abilities\Weapons\GlaiveMissile\GlaiveMissileTarget.mdl
Special Effect - Destroy (Last created special effect)
For each (Integer A) from 1 to 3, do (Custom script: call RemoveLocation(udg_MS_Picked_unit_loc[GetForLoopIndexA()]))
Custom script: call RemoveLocation(udg_FCCasterLoc)
Custom script: call RemoveLocation(udg_FCEnteringUnitLoc1[udg_FCCV])
Custom script: call RemoveLocation(udg_FCEnteringUnitLoc2[udg_FCCV])
Custom script: call RemoveLocation(udg_FCEnteringUnitLoc3[udg_FCCV])
Help would be appreciated and +rep. Thanks =D