hopy
Active Member
- Reaction score
- 64
I wanted to make an ability that would make a unit go beserk, be uncontrolable and attack random units in sight ... so far it is kinda failing...
An_Unit is a Unit variable
An_Point is a Point Variable
An_Unit_Group and Tr_Unit_Group are Unit group variable
Anger [dummy] is a an ability based on Bloodlust with 5 levels and 9+3xlvl duration or so
I also have a different trigger that removes the unit from selection all the time to prevent the player from giving orders ...
The problem here is the debuff disapears and the target unit only attacks a random unit once and afther that just acts normaly.
Can someone tell me why this happens or if there's a better way of getting this ability working.
Trigger:
- Anger
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Anger [Mediator]
- Actions
- Set An_Unit = (Target unit of ability being cast)
- Set An_Point = (Position of An_Unit)
- Unit - Create 1 Dummy Unit for (Owner of An_Unit) at An_Point facing Default building facing degrees
- Unit - Add Anger [Dummy] to (Last created unit)
- Unit - Set level of Anger [Dummy] for (Last created unit) to (Level of Anger [Mediator] for (Triggering unit))
- Unit - Order (Last created unit) to Orc Shaman - Bloodlust An_Unit
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Set An_Unit_Group = (Units within 300.00 of An_Point matching ((((Unit-type of (Matching unit)) Not equal to Dummy Unit [Anti Magic Field]) and ((Unit-type of (Matching unit)) Not equal to Dummy Unit)) and (((Unit-type of (Matching unit)) Not equal to Dummy Unit [Veng]) and ((Ow
- Set Tr_Unit_Group = (Random 1 units from An_Unit_Group)
- Unit Group - Pick every unit in Tr_Unit_Group and do (Actions)
- Loop - Actions
- Unit - Order An_Unit to Attack (Picked unit)
- Loop - Actions
- Custom script: call DestroyGroup (udg_Tr_Unit_Group)
- For each (Integer A) from 1 to (4 + (Level of Anger [Mediator] for (Triggering unit))), do (Actions)
- Loop - Actions
- Wait 1.50 game-time seconds
- Set An_Point = (Position of An_Unit)
- Set An_Unit_Group = (Units within 300.00 of An_Point matching ((((Unit-type of (Matching unit)) Not equal to Dummy Unit [Anti Magic Field]) and ((Unit-type of (Matching unit)) Not equal to Dummy Unit)) and (((Unit-type of (Matching unit)) Not equal to Dummy Unit [Veng]) and ((Ow
- Set Tr_Unit_Group = (Random 1 units from An_Unit_Group)
- Unit Group - Pick every unit in Tr_Unit_Group and do (Actions)
- Loop - Actions
- Unit - Order An_Unit to Attack (Picked unit)
- Loop - Actions
- Custom script: call DestroyGroup (udg_Tr_Unit_Group)
- Loop - Actions
- Custom script: call RemoveLocation (udg_An_Point)
- Custom script: call DestroyGroup (udg_An_Unit_Group)
- Events
An_Unit is a Unit variable
An_Point is a Point Variable
An_Unit_Group and Tr_Unit_Group are Unit group variable
Anger [dummy] is a an ability based on Bloodlust with 5 levels and 9+3xlvl duration or so
I also have a different trigger that removes the unit from selection all the time to prevent the player from giving orders ...
The problem here is the debuff disapears and the target unit only attacks a random unit once and afther that just acts normaly.
Can someone tell me why this happens or if there's a better way of getting this ability working.