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

Make unit stationary when using spell.

Status
Not open for further replies.
Level 6
Joined
May 31, 2008
Messages
218
I need to make a units stationary when the unit uses the ability defend.
I tried some stuff but nothing at all happens : /

Any1 got an idea on how to trigger it? (since my triggers failed.)
 
Level 12
Joined
Mar 16, 2006
Messages
992
See the movement snare in defend? Try setting it to 100% or 0%.

Or trigger an invisible root spell and remove the debuff when you stop defending?
 
Level 6
Joined
May 31, 2008
Messages
218
either i'm really bad at this or it wont work, cause when i choose movementspeed factor to 0(even tried very large numbers and negative number) nothing happens. So any1 would like to write almost exactly how to make a trigger work, since defend is a ability you use until yu turn it off, what should i trigger it like? Units start casting ability?
 
Level 6
Joined
Dec 9, 2008
Messages
233
Here it goes:

Event---> Unit(your hero) starts casting an ability
Conditions---> Ability being cast equal to Defend
Action---> Set movement speed of (casting units) to 0
> Set (owner of ( triggering unit)) treat (all players) as allies
And then make another trigger.

Events---> Unit finishes casting an ability
Conditions---> Ability being finished equal to Defend
Actions---> Set movement speed of (triggering unit) to unit's default
> Set (owner of (triggering unit)) treat (All players) as enemies

I hope this will work, even i hadn't time to test it...is this what you were looking for?
 
Level 6
Joined
May 31, 2008
Messages
218
Here it goes:

Event---> Unit(your hero) starts casting an ability
Conditions---> Ability being cast equal to Defend
Action---> Set movement speed of (casting units) to 0
> Set (owner of ( triggering unit)) treat (all players) as allies
And then make another trigger.

Events---> Unit finishes casting an ability
Conditions---> Ability being finished equal to Defend
Actions---> Set movement speed of (triggering unit) to unit's default
> Set (owner of (triggering unit)) treat (All players) as enemies

I hope this will work, even i hadn't time to test it...is this what you were looking for?

well, it's a big strategy map, armies and camps and shit. this unit is supposed to have a hold the line thing, so when he activates defend it will be stationary as to make a line with like 12 of these units to make it easier to defend.

Maybe i should have explained more : (
 
Level 6
Joined
Dec 9, 2008
Messages
233
aha...when your unit - maybe Footman - casts that Defend spell, other 12 units of same type create in line (6 units in right - Footman - 6units in left )?? If is this what are you looking for, than this trigger should do ( but you'll have to download WE Unlimited, it supports this type of trigger ):

Events---> Unit begins casting an ability
Conditions---> Ability being cast equal to Defend
Actions---> Create special effect wave using Footman model, facing 90 degrees, over distance you want
> Create special effect wave using Footman model, facing 270 degrees, over distance you want

This is only thing i can think of right now, but I will look into your matter deeper...
And this trigger will just make imaginary footmans, which will disappear in a second...
Sorry but right now I don't know how to make them stay
 
Level 6
Joined
May 31, 2008
Messages
218
aha...when your unit - maybe Footman - casts that Defend spell, other 12 units of same type create in line (6 units in right - Footman - 6units in left )?? If is this what are you looking for, than this trigger should do ( but you'll have to download WE Unlimited, it supports this type of trigger ):

Events---> Unit begins casting an ability
Conditions---> Ability being cast equal to Defend
Actions---> Create special effect wave using Footman model, facing 90 degrees, over distance you want
> Create special effect wave using Footman model, facing 270 degrees, over distance you want

This is only thing i can think of right now, but I will look into your matter deeper...
And this trigger will just make imaginary footmans, which will disappear in a second...
Sorry but right now I don't know how to make them stay

nah that was wrong alos, it's just an example(i kinda suck at explaning/to lazy)

Oki, i do it properly now: I want a spell(named hold the line) this is based on defend. When a unit activates this the unit will gain a much faster attack speed and become more resistance to piercing and shit, and since the unit would become imba if he could move i want the unit to become stationary while using ability. This is a map where you can make multiple units, just like ordniary wc3 games. So you might have 12 units and all of these uses this ability and this will create a nice defense. That was the basic idea.
 
Level 6
Joined
Dec 9, 2008
Messages
233
Isn't that basic Defense spell? I don't get it again..
I don't know how to give it more attack speed while unit is in that Hold the Line spell....maybe with some dummy item or unit
 
Level 11
Joined
Oct 20, 2007
Messages
342
Let me explain why set movespeed to 0 isn't work:
how fix it....

There got a minimum movespeed in unit editor,
even you set it to a value lower than minimum movespeed it will return as the minimum movespeed.

to fix it,
set the value to -1 but not 0,

if you set it to 0 it will follow the value in gameplay contant.
(advance > gameplay contant > movement > minimum movespeed)




(Download the map i have attached is the Easiest WAY)

Get a skill like Ensnare(Aens) (ablity > orc > unit > ensare) or (crtl+F) to find.
add it to a dummy unit.
  • defend on
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (String((Issued order))) Equal to defend
    • Actions
      • Set Temp_Point1 = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Triggering player) at Temp_Point1 facing Temp_Point1
      • Unit - Order (Last created unit) to Orc Raider - Ensnare (Triggering unit)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_Temp_Point1)
  • defend off
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (String((Issued order))) Equal to undefend
    • Actions
      • Unit - Remove Defend buff from (Triggering unit)
 

Attachments

  • Defend.w3x
    17.8 KB · Views: 73
Level 3
Joined
Dec 14, 2008
Messages
41
You can change attack speed the same way you chage movement speed, but instead of 1.00 set "Data - Attack speed factor" to -1.00 in the defend ability. You need to change de gameplay constants first, so you can enter negative values.
 
Level 6
Joined
May 31, 2008
Messages
218
Let me explain why set movespeed to 0 isn't work:
how fix it....

There got a minimum movespeed in unit editor,
even you set it to a value lower than minimum movespeed it will return as the minimum movespeed.

to fix it,
set the value to -1 but not 0,

if you set it to 0 it will follow the value in gameplay contant.
(advance > gameplay contant > movement > minimum movespeed)




(Download the map i have attached is the Easiest WAY)

Get a skill like Ensnare(Aens) (ablity > orc > unit > ensare) or (crtl+F) to find.
add it to a dummy unit.
  • defend on
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (String((Issued order))) Equal to defend
    • Actions
      • Set Temp_Point1 = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Triggering player) at Temp_Point1 facing Temp_Point1
      • Unit - Order (Last created unit) to Orc Raider - Ensnare (Triggering unit)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_Temp_Point1)
  • defend off
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (String((Issued order))) Equal to undefend
    • Actions
      • Unit - Remove Defend buff from (Triggering unit)

ty, i try this now. Since i had already tried negative values and stuff, and nothing happened i realised i had to use a trigger. i might not have learnt anything now, but on the other hand i suck at triggers and i wouldn't have been able to make this on my own.

Ohh, and can this be used by multiple units at the same time?


Damn, it wont work. I checked all things a few times now. But how can i know that the trigger utilize the right ensnare?
 
Last edited:
Level 11
Joined
Oct 20, 2007
Messages
342
ty, i try this now. Since i had already tried negative values and stuff, and nothing happened i realised i had to use a trigger. i might not have learnt anything now, but on the other hand i suck at triggers and i wouldn't have been able to make this on my own.
you set the minimum movement speed to -1, but you also need a guard with trigger. like :
  • defend on
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (String((Issued order))) Equal to defend
    • Actions
      • Unit - Set (Triggering unit) movement speed to 0.00
Ohh, and can this be used by multiple units at the same time?
yes, it a very simple trigger that without "wait" function...


Damn, it wont work. I checked all things a few times now. But how can i know that the trigger utilize the right ensnare?


You din't download my map?? i have done the skill in the map

http://www.hiveworkshop.com/forums/attachments/f98/44225d1230034065-make-unit-stationary-when-using-spell-defend.w3x

if you have check the trigger is prefectly same...
but you have many to check...

1st is the skill -> ensnare: (Copy ensnare from orc skill)
Techtree - Requirement = (Delete all)
Text - Editor Suffix = Custom (don't let u confuse when choosing)
Art - Missile Art = (Delete all)
Stat - Duration - Hero = 0.00 (forever)
Stat - Duration - Unit = 0.00 (forever)
Stat - Buff = (create a new buff in buff editor from any of buff. name it as "Defend" or other) and TWO time to the Stat - Buff field...

2nd the BUFF (Defend)->

to completely hide the buff
Close all value in ART section, except icon, put the icon u like.

3rd the dummy ->
Add the skill you have created, "Ensnare Custom".
Art - animation - Cast Backswing = 0.000
Art - animation - Cast Point = 0.000
Art - Model File = .mdl (write yourself in "Custom")
Art - Shadow Image (unit) = none
Combat - Attack Enabled = None
Combat - Death Type = Can't raise, Does not decay
Movement - Speed Base = 0
Movement - Type = Fly
Stats - Mana Initial Amount = 1000000
Text - Name = Dummy
 
Level 6
Joined
May 31, 2008
Messages
218
Status
Not open for further replies.
Top