• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Lose control of unit

Status
Not open for further replies.
Level 3
Joined
Apr 26, 2008
Messages
26
How can i make enemy lose of control hes unit??? so its hes unit but he cant move it etc i got spell psychic scream(aoe fear) triggers goes liek this tell me if you solve problem :cute:

Trigger named: Psychic
  • Unit - A unit Starts the effect of an ability
  • (Ability being cast) Equal to Psychic Scream
  • Set Caster = (Casting unit)
  • Set Taunt = (Position of (Casting unit))
  • Set Scream_run = (Units within 750.00 of Taunt)
  • Unit Group - Pick every unit in (Units within 750.00 of Taunt matching (((Picked unit) belongs to an enemy of (Owner of Caster)) Equal to True)) and do (Actions)
    • Loop - Actions
      • Unit Group - Add (Picked unit) to Scream_run
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Picked unit) has buff Psychic Scream ) Equal to True
        • Then - Actions
          • Selection - Clear selection for (Owner of (Picked unit))
        • Else - Actions
  • Trigger - Turn on Scream <gen>
  • Wait 5.00 seconds
  • Trigger - Turn off Scream <gen>
  • Unit Group - Destroy unit group Scream_run
And Here is Trigger Named: Scream (Not enabled)
  • Time - Every 0.10 seconds of game time
  • Unit Group - Pick every unit in Scream_run and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (((Picked unit) has buff Psychic Scream ) Equal to True) and ((Random integer number between 1 and 100) Greater than 33)
        • Then - Actions
          • Selection - Clear selection for (Owner of (Picked unit))
          • Unit - Order (Picked unit) to Move To ((Position of Caster) offset by (1500.00, 750.00))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (((Picked unit) has buff Psychic Scream ) Equal to True) and ((Random integer number between 1 and 100) Greater than 33)
            • Then - Actions
              • Selection - Clear selection for (Owner of (Picked unit))
              • Unit - Order (Picked unit) to Move To ((Position of Caster) offset by (750.00, 1500.00))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (((Picked unit) has buff Psychic Scream ) Equal to True) and ((Random integer number between 1 and 100) Greater than 33)
                • Then - Actions
                  • Selection - Clear selection for (Owner of (Picked unit))
                  • Unit - Order (Picked unit) to Move To ((Position of Caster) offset by (1500.00, 2500.00))
                • Else - Actions
                  • Do nothing
Tell me how can i get eneemy lose control of theyre unit because now they can fastly select their unit and make move so unit dont nearly move any direction :thumbs_down:
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
U have the base(which i have not read in much detail) but u are missing one thing.
  • Unit is selected
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
    • Conditions
      • ((Triggering unit) has buff Psychic Scream ) Equal to True
    • Actions
      • Selection - Remove (Triggering unit) from selection
Hm, there are some mistakes in your triggers
Set Scream_run = (Units within 750.00 of Taunt)
Unit Group - Pick every unit in (Units within 750.00 of Taunt matching (((Picked unit) belongs to an enemy of (Owner of Caster)) Equal to True)) and do (Actions)
Loop - Actions
Unit Group - Add (Picked unit) to Scream_run
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) has buff Psychic Scream ) Equal to True
Then - Actions
Selection - Clear selection for (Owner of (Picked unit))
Else - Actions
if the units are in range, then they will have the buff so that is useless, you better remove the if, and only keep the actions.
In the second trigger you should have no clear selection, since this will be taken care by my trigger. Just keep the move commands.
Also this way it will not be MUI(you are using a global variable group, this trigger should be changed, but i am lazy and will not do it now).
Hmm, another issue: if a unit is lucky it will be ordered to move to the same place twice or even more times. And if it has autocastebles or can shoot out and projectile in less than 0.10 seconds it will ... obviously do that.
 
Status
Not open for further replies.
Top