Hot
New Member
- Reaction score
- 9
On my Modern Warfare map i going to have an Accuracy system. It work likes this when a unit attacks, the trigger check the distance between attacker and attacked unit and if distance is equal to "X" then a custom cursed abillity is cast on the attacking unit
and here's a trigger with values
sure this works great for my rifleman with 2000 range but what if my combat medic attacks and he only got 1600 range then it wont work balanced and proberly right? So how can i make this work correctly for all units with diffrent range with out adding tons of triggers?
+rep
Trigger:
- Accuarcy System
- Events
- Unit - A unit Is attacked
- Conditions
- Actions
- Game - Display to (All players) for 1.00 seconds the text: Trigger Fired!
- Set PointA = (Position of (Attacking unit))
- Set PointB = (Position of (Attacked unit))
- Set Distance = (Distance between PointA and PointB)
- Game - Display to (All players) the text: (Accuracy Distance: + (String(Distance)))
- For each (Integer A) from 1 to 5, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Integer(Distance)) Greater than or equal to (Integer(AccuarcyMin[(Integer A)]))
- (Integer(Distance)) Less than or equal to (Integer(AccuarcyMax[(Integer A)]))
- Then - Actions
- Set AccuarcyLevel = (Integer A)
- Game - Display to (All players) the text: (String(AccuarcyLevel))
- Unit - Create 1 Dummy for (Owner of (Attacking unit)) at PointA facing Default building facing degrees
- Unit - Add MissAbility[(Integer A)] to (Last created unit)
- Unit - Order (Last created unit) to Undead Banshee - Curse (Attacking unit)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Custom script: call RemoveLocation( udg_PointA )
- Custom script: call RemoveLocation( udg_PointB )
- Events
and here's a trigger with values
Trigger:
- Install
- Events
- Map initialization
- Conditions
- Actions
- Set MissAbility[1] = Accuracy (1)
- Set MissAbility[2] = Accuracy (2)
- Set MissAbility[3] = Accuracy (3)
- Set MissAbility[4] = Accuracy (4)
- Set MissAbility[5] = Accuracy (5)
- -------- ------------------------------------------------------------------------------ --------
- Set AccuarcyMin[1] = 1.00
- Set AccuarcyMax[1] = 400.00
- -------- ------------------------------------------------------------------------------ --------
- Set AccuarcyMin[2] = 401.00
- Set AccuarcyMax[2] = 800.00
- -------- ------------------------------------------------------------------------------ --------
- Set AccuarcyMin[3] = 801.00
- Set AccuarcyMax[3] = 1200.00
- -------- ------------------------------------------------------------------------------ --------
- Set AccuarcyMin[4] = 1201.00
- Set AccuarcyMax[4] = 1600.00
- -------- ------------------------------------------------------------------------------ --------
- Set AccuarcyMin[5] = 1601.00
- Set AccuarcyMax[5] = 2150.00
- Events
sure this works great for my rifleman with 2000 range but what if my combat medic attacks and he only got 1600 range then it wont work balanced and proberly right? So how can i make this work correctly for all units with diffrent range with out adding tons of triggers?
+rep