help with fear spell

CrazyWolf

New Member
Reaction score
4
Hi everyone i want to make a spell named fear and its purpose is to instill fear to a unit and make it unable to attack but also cause it to move around in fear while it can receive damage from its enemies.

I tried to do that by adding the ability Tornado Wander(tornado) into the unit but its owner could still move it and attack.I also cleared selection for its owner but that's not enough cuz he may select it again.I cant add the locust ability to the unit from triggers but even if i could enemies would not be able to attack the unit as long as it would have fear....
PLZ HELP!!
 

ayumilove

Youtube account suspended! youtube.com/ayumilove8
Reaction score
110
you will need to use a trigger to add locust into the unit,
add wander ability (which can be found from critters)

its something like poly morph or hex o_O
 

Exide

I am amazingly focused right now!
Reaction score
448
Locust wouldn't work?
You can't attack a Locust unit, right?
Also, you might want to remove the attack ability for the unit (if it's possible. :p)
Maybe if you gave control of the unit to Neutral Extra or something, while it's affected by fear.
 

Darius34

New Member
Reaction score
30
you will need to use a trigger to add locust into the unit,
add wander ability (which can be found from critters)

its something like poly morph or hex o_O
He already said he couldn't do that.

The best solution would be to disable spellcasting and attacking with Drunken Haze. Make the spell silence everything (even attacks, there is a checkbox for that). Then, transfer ownership of the unit to Neutral Extra or something, and periodically order the unit to run around, say every 0.5 seconds. The only issue is where you'd want the unit to run to though; I would suggest having another trigger to randomly generate locations every 3 seconds or so.

For the DoT, many spells will do; Soul Burn, Shadowstrike, etc or make your own.
 

Exide

I am amazingly focused right now!
Reaction score
448
"Then, transfer ownership of the unit to Neutral Extra or something, and periodically order the unit to run around, say every 0.5 seconds."

Easiest way would be to simply give it the 'Wander' ability. -But I guess that Wander doesn't move the unit quick enough..
 

Darius34

New Member
Reaction score
30
"Then, transfer ownership of the unit to Neutral Extra or something, and periodically order the unit to run around, say every 0.5 seconds."

Easiest way would be to simply give it the 'Wander' ability. -But I guess that Wander doesn't move the unit quick enough..
I don't think you can control the distance moved or the interval with Wander. Wander has a periodic pause between movement and it only moves the unit short distances. If you want the unit to be faster, you can increase it's movement speed, but that would look pretty weird.

The triggered method simply gives more flexibility.
 
K

Kevin

Guest
If the player only controls 1 unit, then disable control for user, then make an issue order trigger for target unit that lasts a duration. It should look like this:

Code:
Event -
Unit is the target of a spell
Conditions
Spell is = to "Such and Such" spell (or something to that effect)
Actions
Remove player control (or disable control) for Owner of Targeted Unit
Issue order to targeted unit - move unit to random position in playable area
wait 1 second
Issue order to targeted unit - move unit to random position in playable area
wait 1 second
Issue order to targeted unit - move unit to random position in playable area
wait 1 second
Issue order to targeted unit - move unit to random position in playable area
wait 1 second
Issue order to targeted unit - move unit to random position in playable area
wait 1 second
Issue order to targeted unit - move unit to random position in playable area
Enable player control for owner of targeted unit

You don't really want to be changing the hero to neutral passive if it dies you may have resurrection problems.

Also, you might want to increase speed for the targeted unit, granting it a + speed ability or using some other method to temporarily increase speed.
 
I

IKilledKEnny

Guest
Here is the fear Ability I did, you may do whatever you want with it. :)

Code:
Fear
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Fear 
        (Unit-type of (Casting unit)) Equal to Illusion Creator 
    Actions
        Set FearAbilityCount = 0
        Set FearUnitGroup = (Units within 600.00 of (Position of (Casting unit)) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and (((Matching unit) is alive) Equal to True)))
        Unit Group - Pick every unit in FearUnitGroup and do (Actions)
            Loop - Actions
                Set FearAbilityCount = (FearAbilityCount + 1)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        FearAbilityCount Less than or equal to 10
                    Then - Actions
                        Set FearPoint = (Position of (Picked unit))
                        Set FearSEI = (FearSEI + 1)
                        Unit - Set the custom value of (Picked unit) to (Player number of (Owner of (Picked unit)))
                        Unit - Change ownership of (Picked unit) to Player 12 (Brown) and Change color
                        Unit - Make (Picked unit) face (Random real number between 0.00 and 360.00) over 0.00 seconds
                        Unit - Order (Picked unit) to Move To (FearPoint offset by 1000000000.00 towards (Facing of (Picked unit)) degrees)
                        Unit Group - Add (Picked unit) to FearUnitGroup2
                        Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Undead\DeathCoil\DeathCoilMissile.mdl
                        Set FearSE[FearSEI] = (Last created special effect)
                        Floating Text - Create floating text that reads Feared!! above (Picked unit) with Z offset 0.00, using font size 8.00, color (10.00%, 10.00%, 100.00%), and 0.00% transparency
                        Floating Text - Change (Last created floating text): Disable permanence
                        Floating Text - Change the lifespan of (Last created floating text) to 2.50 seconds
                    Else - Actions
        Wait 7.00 seconds
        Unit Group - Pick every unit in FearUnitGroup2 and do (Actions)
            Loop - Actions
                Unit - Order (Picked unit) to Stop
                Unit - Change ownership of (Picked unit) to (Player((Custom value of (Picked unit)))) and Change color
                For each (Integer A) from 1 to 10, do (Actions)
                    Loop - Actions
                        Special Effect - Destroy FearSE[(Integer A)]
        Unit Group - Remove all units from FearUnitGroup
        Unit Group - Remove all units from FearUnitGroup2
        Custom script:   call RemoveLocation (udg_FearPoint)
 
M

Mythic Fr0st

Guest
Hmm

Ok

Variables:

Loc, point, array 1
X, integer, no array
C_Value, integer, no array
Unit_C_Value, integer, no array
A, unit, no array
TheUnit, unit, array 1


FIRST, we must mark all units with an ID (custom value)
Code:
Event
   - Map init
Conditions
Actions - pick every unit in units in playable map area
     loop
       - set Custom value of picked unit to C_Value+1
       - set Unit_C_Value = Unit_C_Value + 1
Code:
Event
   - A unit starts the effects of an ability
Conditions ability being cast equal to Fear
Actions
   - set A = target unit of ability being cast
   - set C_Value = Custom value of A
   - set Loc[0] = center of region (a region WAY!!!! out of sight)
   - create 1 (custom unit with no image) at Loc[0] for owner of A
   - set TheUnit[C_Value] = A
   - add a 3 second generic timer to last created unit
  - call RemoveLocation(udg_Loc[0])

Code:
Event 
   - Every 3.00 seconds
Conditions
Actions
   - For each Integer A from 1 to Unit_C_Value
      loop
        if TheUnit[Integer A] is alive equal to true
        then - set Loc[1] = position of TheUnit[Integer A]
        - set Loc[2] = Loc[1] offset by random number between 20 and 75 towards random angle
        - order TheUnit[Integer A] to move to Loc[2]
        - call RemoveLocation(udg_Loc[1])
        - call RemoveLocation(udg_Loc[2])

NOTE if you have TO many units it may / may not crash (I havent tested)

Anyway, it should work, and I dont think theres any leaks (brb chores)

But, put a region way out of sight, and make a custom unit with no image, (and 0.10 death time)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top