• 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.

Help with Fear spell

Status
Not open for further replies.
Level 2
Joined
Aug 12, 2004
Messages
10
I want to make a spell causes all enemy units around the caster to run away from him. I've tried making it several ways, but I can't seem to get it to work. Any help would be greatly appreciated.

I honestly don't care how it looks when cast, but I need it to make all non-hero enemy units around the caster run directly away from him and remove player control of the affected units until the spell ends.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Ok, I tried to make a similar spell called Cloak of Fear. It is like Immolation spell and works greatly but unfortunately lags a lot. Perhaps my computer is the problem (I have a pentium II at 533Mhz so it kinda sucks). So, if this doesn't bother you I can help you with the spell I made, if you like the variant. So, as Vexorian says, you would make the units flee in panic for a couple of seconds. Depending on the level, it runs for more seconds. But I beleive it is a little bit too overpowered. Take Immolation for base, Change buffs, AoE to 0, icons, effects. Change damage to 0. I think that's all for the skill, oh and change name to Fear. Ok, now let's go to triggers.

Fear

Events - A unit Is Attacked
Conditions - ((Attacked unit) has Fear buff) equal to true
Actions - If, Then, Else (Multiple Actions)
[NOTE: I will make the If, Then,Else for first level only. Just change the level from IF to 2 respectively 3 and the number of waiting seconds to 2 respectively 3).
IF - (Level of Fear for (Casting Unit)) equal to 1
THEN - Unit - Change ownership of (Attacking Unit) to Neutral Passive and Retain Color
- Order (Attacking unit) to Move To ((Position of (Attacking Unit)) offset by 250 towards 0.00 degrees)
- Wait 1 seconds
- Unit - Change Ownership of (Attacking Unit) to (Previous Owner) and Retain Color.

That is all. Though the last line may be changed a little by giving an integer value to the unit, the value being equal to the number of the owner of the unit. You would then change ownership to player with index value, where the value would be the integer value of the unit. Well, i gave you this alternative since it's faster but it can cause problems if the target is affected by Charm. I may found a solution for this as well.
 
Level 2
Joined
Aug 12, 2004
Messages
10
THEN - Unit - Change ownership of (Attacking Unit) to Neutral Passive and Retain Color
- Order (Attacking unit) to Move To ((Position of (Attacking Unit)) offset by 250 towards 0.00 degrees)
- Wait 1 seconds
- Unit - Change Ownership of (Attacking Unit) to (Previous Owner) and Retain Color.


Only having a few problems:

I don't know how to do the offset part of the move option. I can't seem to find that on any of the options.

If you have enemies of more than one color, you can't change them to "Previous Owner," it doesn't seem to work for some reason.
 
Level 2
Joined
Aug 12, 2004
Messages
10
This is what my code looks like right now:

Code:
Events
Unit - A unit Finishes casting an ability.

Conditions
(Ability being cast) Equal to Fear

Actions

Unit Group - Add all units of (Units within 800.00 of (Position of (Triggering Unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering Unit)) Equal to True)) to Fear

Unit Group - Pick every unit in Fear and do (Actions)
 Loop - Actions
  Unit - Change ownership of (Picked unit) to Neutral Passive and Retain color
  Unit - Order (Picked unit) to Move To (Position of (Triggering uit))
  Wait 7.00 seconds
  Unit - Change ownership of (Picked unit) to (Previous owner) and Retain color


I have the base spell setup to only affect targets that are enemies of the caster. Doesn't affect the caster's units, allies, or neutral passive.
 
Level 2
Joined
Aug 12, 2004
Messages
10
Actually, I was thinking, I don't even need to change player owner...

If I can figure out how to give a move order with the offset, I can give all the units a locust ability just before issuing the order. Then they wouldn't be selectable or attack anyone.

Wait, the only problem with that is, you won't be able to attack someone that is running away if you use this spell...

*goes back to playing with the editor*
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Umm... the second version you made takes ALL the units in the caster's 800 range. Sounds stupid... Well, depending on what spell you based it. And if you don't change alignment, you don't get the right effect (because enemy can control units immediately back...). And I searched for Locust skill in the list but didn't find it... What you want to do is like a polarized Taunt from what I get and well, I guess I can help with this as well. And this is a hero skill, so I can do it only for one unit/player.

First, change from (Unit finishes Casting an ability) to (Unit begins the Effect of an ability). It's much better, believe me.

Secondly, make levels once again. If you don't make levels, the spell won't be so useful. Like... what do you want to change, the mana cost? And 7 seconds is FAAAAR too much. I would recommend 2/3/5 or something like this but NOT 7. Do not go over 5 and do not go beyound 2. 1 is far too small and 6 already high. You can do this with IF, THEN, ELSE and I showed you an example earlier.

Thirdly... Umm, what you actually do now is get the units COME to the caster which is like a taunt. Not useful at all. You need to do the first technique and I can show it to you phase to phase. So, I said Order (Attacking unit) to Move To ((Position of (Attacking Unit)) offset by 250 towards 0.00 degrees).

-> Go to "Unit - Order with point" and select Move action
-> At the region select from the list "Polar Offset"
-> Change the points to position of unit and change unit to (Attacking Unit)
-> Change the offset to 250 and the degrees to 0.

Hope you got it now...

Fourthly and hopefully lastly, I guess you don't know how to do the ownership stuff either so I will explain it phase to phase as well and where to implement it. It's easier and goes the same everywhere you want to implement this. Just that sometimes this technique tends to overwhelm itself if used at more than one spell. ^_^ Well, here we go.

-> Into the first action line of the picking units within 800 of Triggering Unit, add the "Unit - Set Custom Value" with the following ajustments
-> Change Unit field to (Picked Unit)
-> Change 0 value field to Player - Player Number
-> Set its value to (Triggering Player) or to (Owner of (Triggering Unit))

That's all for this. Then all you have to do to bring back the units to the original owner is to give the player field:

-> Conversion - Convert Player Index to Player
-> Change the value of 1 to Unit - Custom Value of (Picked Unit)

Make sure to have all part of fear into the pick. Hope it helped you at least for a little what I told you...
 
Level 2
Joined
Aug 12, 2004
Messages
10
Thanks, I've never actually done a spell where it changes ownership of the units before. I've done a lot of spells, but never needed to change ownership or anything like that.


"Unit begins the Effect of an ability"? I can't seem to find that. I've always used "Unit finishes casting an ability."
 
Level 2
Joined
Aug 12, 2004
Messages
10
Problem is, I need them to run away from the caster. I can't seem to get them to do that.
 
Level 2
Joined
Aug 12, 2004
Messages
10
It's an area effect spell.

If anyone wants to try their hand at making this, go for it.

I'm about to give up. I can't seem to get it to work.


It's supposed to make everyone within range 800 of the caster run away from the caster for 4 seconds. While they are running, the affected targets can't be controlled by the owning player, but they can still be attacked.
 
Level 2
Joined
Aug 12, 2004
Messages
10
I'm not giving up, I'm just moving on to some other things in the map. I'll keep playing with it off and on until I can get it to work.

Hopefully someone out there can figure out what to do to fix it.
 
Status
Not open for further replies.
Top