Help me with Spell +rep

vypur85

Hibernate
Reaction score
803
Also, just for future reference, your trigger did not work probably because the 'Minimum Movement Speed' in Gameplay Constant is not set to zero. Gameplay Constant is located at Terrain Editor > Advanced > Gameplay Constant.

To set to zero, hold SHIFT + double click the field of interest. Then, just set zero.
 

havefaith

New Member
Reaction score
2
Ok so iv been trying to make a spell based off the ability Defend. What i want it to do is when i use the ability the unit casting is unable to move, but he gains the ability based off evasion where i have a 75% chance to dodge. You are able to move again and you lose the evasion when you Cancel the Ability, also i want a barricade to be made infront of the unit casting the ability. Iv been trying so hard to make this trigger... i would think it was simple but apparently not... would any one mind making this ability for me, or tell me how to do it!!!!! would really appriciate it!!!
 
S

Scroller

Guest
Code:
Untitled Trigger 001
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Animate Dead
    Actions
        Unit - Order (Casting unit) to Hold Position
        Unit - Add Evasion (Neutral Hostile) to (Casting unit)
        Unit - Create 1 (Dummy unit for Barricade) for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
        Set Region = (Region centered at (Position of (Casting unit)) with size (1.00, 1.00))

Code:
Untitled Trigger 002
    Events
        Unit - A unit leaves Region 014 <gen>
    Conditions
    Actions
        Unit - Remove Evasion (Neutral Hostile) from (Casting unit)

These triggers should ensure the spells should work. They need to be tweaked a little though and they leak. If my region size is wrong experiment till you get it right. Oh and I advise to create a dummy unit for the barricade.
 

havefaith

New Member
Reaction score
2
ok but once they move wouldnt it cancel the ability? well i guess that could work, different from how i wanted it but still fine.... but how would i make it so a barricade gets created infront of the unit?
 

FireBladesX

Eating my wings!
Reaction score
123
Personally, I would do it by making defend slow by 1000%, and make sure that your gameplay constants minimum movespeed is 1.

The, I would detect if the hero toggles defend on or off using a string comparison, issued order equal to "defend" or "undefend".

Evasion would be added for the first, taken away for the second. You can create the barricade with Unit - create unit, using a point with a polar offset, with an angle equal to the facing of the triggering unit.
 

havefaith

New Member
Reaction score
2
FirebladesX thanks very much you solved the movment problem.... the problem is for some reason when i use the ability i dont get the extra abilty... this is the trigger im using tell me what im doing wrong
Trigger:
  • Take Cover
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Take Cover!
    • Actions
      • Unit - Set (Casting unit) movement speed to 0.00
      • Unit - Add Taking Cover! to (Casting unit)
 

havefaith

New Member
Reaction score
2
What is wrong with this trigger? +rep

Trigger:
  • Take Cover
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Take Cover!
    • Actions
      • Unit - Add Taking Cover! to (Casting unit)
      • Unit - Create 1 Cover for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
 

Psiblade94122

In need of sleep
Reaction score
138
you gotta be more specific, i dont see anything wrong with the trigger, are you casting the correct spell?
 

havefaith

New Member
Reaction score
2
heh, my point exactly i dont see anything wrong with it... its a simple trigger yet... it doesnt work for me =[ yes im casting the right ability.... its just plain and simple nothing happening! ------- on a side note... what would i do to prevent it from leaking?
 
Reaction score
341
Trigger:
  • Take Cover
    • Events
    • Unit - A unit Begins casting an ability
    • Conditions
    • (Ability being cast) Equal to Take Cover!
    • Actions
    • set SomePointVar = Position of (Casting unit)
    • Unit - Add Taking Cover! to (Casting unit)
    • Unit - Create 1 Cover for (Owner of (Casting unit)) at SomePointVar facing Default building facing degrees
    • Custom Script: call RemoveLocation(udg_SomePointVar)


Are you sure your even casting the right ability?
 

havefaith

New Member
Reaction score
2
quite sure.... im not incompatant rofl... =p ill try remaking the trigger following yours see what happends
 
Reaction score
341
Trigger:
  • Unit - Add Taking Cover! to (Casting unit)


Why do you have that there, The unit already is casting the spell.
 

Psiblade94122

In need of sleep
Reaction score
138
is "cover" a dummy unit with no model and locoust?

@ trigger happy: The spell cast is TAKE Cover, the added ability is TAKEING cover 2 abilities
 

havefaith

New Member
Reaction score
2
Cover is a dummy unit of a Human Building Farm with a model change into the destructable barricade.
 

havefaith

New Member
Reaction score
2
so i need to make a variable for the pos of the spell =\ what should the variable be??? TakeCover Point -none-?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top