- Joined
- Aug 5, 2015
- Messages
- 202
I have a spell from Marvel vs. Capcom SP v1.1 : Berserker Barrage X
So i have a Boss in my map, i want Boss have that Skill.
and i want trigger if enemy units come near the boss then
from behind each enemy units from behind them (1000 range within the boss)
i want create dummy then order each created dummy to using Berserker barrage x spell (based on shockwave spell) and target it to the position of the Boss
still cant figure out the right trigger to working it
kinda desperate here :'(
So i have a Boss in my map, i want Boss have that Skill.
and i want trigger if enemy units come near the boss then
from behind each enemy units from behind them (1000 range within the boss)
i want create dummy then order each created dummy to using Berserker barrage x spell (based on shockwave spell) and target it to the position of the Boss
still cant figure out the right trigger to working it
Code:
slash go
Events
Unit - A unit comes within 700.00 of Troll Chieftain 0244 <gen>
Conditions
((Triggering unit) belongs to an enemy of (Owner of Troll Chieftain 0244 <gen>)) Equal to True
Actions
Set SLASHREGION = (Position of Troll Chieftain 0244 <gen>)
Set SLASHPICKED = (Position of (Picked unit))
Set SLASHGROUP = (Units within 1000.00 of SLASHREGION matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Troll Chieftain 0244 <gen>)) Equal to True)))
Unit Group - Pick every unit in SLASHGROUP and do (Actions)
Loop - Actions
Unit - Create 1 Dummy Unit for (Owner of Troll Chieftain 0244 <gen>) at (SLASHPICKED offset by 200.00 towards 270.00 degrees) facing SLASHREGION
Unit - Add Troll X Slasher (Neutral Hostile) to (Last created unit)
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave SLASHREGION
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_SLASHREGION)
Custom script: call RemoveLocation (udg_SLASHPICKED)
Custom script: call DestroyGroup (udg_SLASHGROUP)
kinda desperate here :'(
Code:
BBarrage
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Troll X Slasher (Neutral Hostile)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BB_Integers[1] Equal to 0
Then - Actions
Trigger - Turn on BB2 <gen>
Else - Actions
Set BB_Integers[0] = (BB_Integers[0] + 1)
Set BB_Integers[1] = (BB_Integers[1] + 1)
Set BB_Caster[BB_Integers[1]] = (Triggering unit)
Set MVC_Point[0] = (Position of BB_Caster[BB_Integers[1]])
Set MVC_Point[1] = (Target point of ability being cast)
Set BB_Angle[BB_Integers[1]] = (Angle from MVC_Point[0] to MVC_Point[1])
-------- ---------------- --------
-------- ---------------- --------
-------- ------------------------SETUP------------------------ --------
-------- ---------------- --------
-------- Set below the damage of the spell per interval --------
Set BB_Damage[BB_Integers[1]] = 900.00
-------- ---------------- --------
-------- You can change the variable below if you want the unit to exceed the target point --------
Set BB_Distance[BB_Integers[1]] = (Distance between MVC_Point[0] and MVC_Point[1])
-------- ---------------- --------
-------- Set below the intervals of the damage --------
Set BB_Interval[BB_Integers[1]] = 0.08
-------- ---------------- --------
-------- Set below the speed of the unit when charging --------
Set BB_Speed[BB_Integers[1]] = 50.00
-------- ---------------- --------
-------- Set below the unit - Flash (BB) --------
Set MVC_UnitType[7] = Flash (BB)
-------- ---------------- --------
-------- END OF SETUP --------
-------- ---------------- --------
-------- ---------------- --------
Set BB_Check[BB_Integers[1]] = True
Unit - Turn collision for BB_Caster[BB_Integers[1]] Off
Custom script: call RemoveLocation (udg_MVC_Point[0])
Custom script: call RemoveLocation (udg_MVC_Point[1])
Code:
BB2
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
For each (Integer BB_Integers[2]) from 1 to BB_Integers[1], do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BB_Check[BB_Integers[2]] Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BB_Distance[BB_Integers[2]] Greater than 0.00
Then - Actions
Set BB_Distance[BB_Integers[2]] = (BB_Distance[BB_Integers[2]] - BB_Speed[BB_Integers[2]])
Set MVC_Point[0] = (Position of BB_Caster[BB_Integers[2]])
Set MVC_Point[1] = (MVC_Point[0] offset by BB_Speed[BB_Integers[2]] towards BB_Angle[BB_Integers[2]] degrees)
Unit - Move BB_Caster[BB_Integers[2]] instantly to MVC_Point[1], facing BB_Angle[BB_Integers[2]] degrees
Animation - Play BB_Caster[BB_Integers[2]]'s attack animation
Unit - Create 1 MVC_UnitType[7] for (Owner of BB_Caster[BB_Integers[2]]) at MVC_Point[1] facing (BB_Angle[BB_Integers[2]] + 45.00) degrees
Set RAS_Dummy = (Last created unit)
Set RAS_Duration = 0.50
Set RAS_HeightInc = False
Set RAS_Color = 0.00
Trigger - Run RemoveA <gen> (checking conditions)
Unit - Create 1 MVC_UnitType[7] for (Owner of BB_Caster[BB_Integers[2]]) at MVC_Point[1] facing (BB_Angle[BB_Integers[2]] - 45.00) degrees
Set RAS_Dummy = (Last created unit)
Set RAS_Duration = 0.50
Set RAS_HeightInc = False
Set RAS_Color = 0.00
Trigger - Run RemoveA <gen> (checking conditions)
Set BB_Timer[BB_Integers[2]] = (BB_Timer[BB_Integers[2]] + 0.04)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BB_Timer[BB_Integers[2]] Greater than or equal to BB_Interval[BB_Integers[2]]
Then - Actions
Set BB_Timer[BB_Integers[2]] = 0.00
Set MVC_PickGroup = (Units within 130.00 of MVC_Point[1] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of BB_Caster[BB_Integers[2]])) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching
Unit Group - Pick every unit in MVC_PickGroup and do (Actions)
Loop - Actions
Unit - Cause BB_Caster[BB_Integers[2]] to damage (Picked unit), dealing BB_Damage[BB_Integers[2]] damage of attack type Spells and damage type Universal
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call DestroyGroup (udg_MVC_PickGroup)
Else - Actions
Custom script: call RemoveLocation (udg_MVC_Point[0])
Custom script: call RemoveLocation (udg_MVC_Point[1])
Else - Actions
Set BB_Check[BB_Integers[2]] = False
Unit - Turn collision for BB_Caster[BB_Integers[2]] On
Animation - Reset BB_Caster[BB_Integers[2]]'s animation
Set BB_Timer[BB_Integers[2]] = 0.00
Set BB_Integers[0] = (BB_Integers[0] - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BB_Integers[0] Equal to 0
Then - Actions
Set BB_Integers[1] = 0
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions