So i'm making a Missile that follows a target(with a dummy unit) yeah the movement works but im having problem with the damage/explosion things,i want it to be that when that dummy unit(Missile) comes near a flying unit then that dummy unit would get removed and damage would be done to the flying unit,heres what i've tried so far....
-
SidewinderMExl
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
- Set RLoc = (Playable map area)
- Set PUnitLoc = (Position of (Matching unit))
- Set UnitLoc = (Position of (Picked unit))
-
Unit Group - Pick every unit in (Units in RLoc matching (((Picked unit) is A flying unit) Equal to True)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in (Units within 512.00 of UnitLoc)) Greater than or equal to 1
- Then - Actions
- Else - Actions
-
If - Conditions
- Set MissileNear = (Units within 500.00 of UnitLoc matching ((Unit-type of (Matching unit)) Equal to Sidewinder Missile))
- Unit - Cause (Matching unit) to damage circular area after 0.20 seconds of radius 350.00 at PUnitLoc, dealing (Random real number between 600.00 and 750.00) damage of attack type Siege and damage type Demolition
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call RemoveRect(udg_RLoc)
- Custom script: call RemoveLocation(udg_PUnitLoc)
- Custom script: call RemoveLocation(udg_UnitLoc)
-
Events