Spell Problems

PooBucket

New Member
Reaction score
12
1. I have an ability which is exactly like Blizzard but no channeling, it use to work I don't know what I did but now it sends only one wave of it and then stops, I've set it to 6 shards 6 waves and then level 2 7 waves 7 shards in the object editor blah blah blah.
Code:
Hail
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Hail 
    Actions
        Set Hail_Point = (Target point of ability being cast)
        Set Hail_Caster_Position = (Position of (Casting unit))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Hail  for (Casting unit)) Equal to 1
            Then - Actions
                Unit - Create 1 Hail for (Owner of (Casting unit)) at Hail_Caster_Position facing Default building facing degrees
                Unit - Turn collision for (Last created unit) Off
                Unit - Add Hail (Hail Effect) to (Last created unit)
                Unit - Order (Last created unit) to Human Archmage - Blizzard Hail_Point
                Unit - Add a 7.00 second Generic expiration timer to (Last created unit)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Hail  for (Casting unit)) Equal to 2
            Then - Actions
                Unit - Create 1 Hail for (Owner of (Casting unit)) at Hail_Caster_Position facing Default building facing degrees
                Unit - Turn collision for (Last created unit) Off
                Unit - Add Hail (Hail Effect) to (Last created unit)
                Unit - Increase level of Hail (Hail Effect) for (Last created unit)
                Unit - Order (Last created unit) to Human Archmage - Blizzard Hail_Point
                Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Hail  for (Casting unit)) Equal to 3
            Then - Actions
                Unit - Create 1 Hail for (Owner of (Casting unit)) at Hail_Caster_Position facing Default building facing degrees
                Unit - Turn collision for (Last created unit) Off
                Unit - Add Hail (Hail Effect) to (Last created unit)
                Unit - Set level of Hail (Hail Effect) for (Last created unit) to 3
                Unit - Order (Last created unit) to Human Archmage - Blizzard Hail_Point
                Unit - Add a 13.00 second Generic expiration timer to (Last created unit)
            Else - Actions
        Custom script:   call RemoveLocation (udg_Hail_Point)
        Custom script:   call RemoveLocation (udg_Hail_Caster_Position)


2. I've made an ability that absorbs certain amount of damage, but I want a special effect on the unit so when the shield runs out, or the duration of time is gone, the special effect is gone. But when I tried it stays there forever, can someone help this simple question out?
Code:
Holy Shield
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Holy Shield 
    Actions
        Set DamageAbsorbed = ((Real((Level of (Ability being cast) for (Triggering unit)))) x (300.00 - ((Real((Level of (Ability being cast) for (Triggering unit)))) x (100.00 + 100.00))))
        Trigger - Add to Holy Shield Eventless <gen> the event (Unit - (Target unit of ability being cast) Takes damage)
        If (DamageAbsorbed Greater than 0.00) then do (Special Effect - Create a special effect attached to the origin of (Casting unit) using Abilities\Spells\Human\DivineShield\DivineShieldTarget.mdl) else do (Special Effect - Destroy (Last created special effect))
        Wait 20.00 seconds
        Set DamageAbsorbed = 0.00

Code:
Holy Shield Eventless
    Events
    Conditions
        DamageAbsorbed Greater than 0.00
    Actions
        Set DamageAbsorbed = (DamageAbsorbed + (Damage taken))
        If (DamageAbsorbed Greater than or equal to 0.00) then do (Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))) else do (Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Damage taken) + DamageAbsorbed)))
 

Exide

I am amazingly focused right now!
Reaction score
448
1.
Not sure what's wrong with your spell..
However, you should change the event to
Starts the effects of an ability
and change every
(Casting Unit) into (Triggering Unit)

Also make sure that your Hail-unit is invulnerable, has enough mana, and all that -so it can't be interupted by the environment.
 

PooBucket

New Member
Reaction score
12
1. Why change all the Casting Units to Triggering Units? Wouldn't it be atually better if it were casting units (Don't really understand)? And what's the difference between begins casting an ability and starts the effect of an ability, it seems like the same thing.

2. Will someone please help me? It's not solved yet.

Thanks to all the people who help! :<3
 

jnZ

I
Reaction score
64
casts an ability isnt as efficient as starts the effect of an ability because you would still be able to interrupt it and the trigger fires with a non-casted spell.

EDIT: i looked through your blizzard code and it seems fine. try to add a 2sec wait before destroying the locations maybe its to early and the dummy couldnt start the ability otherwise the problem seems to be in the object manager.

and btw: your coding is very inefficient
 

MoonSlinger

I Love using Cheap Tricks... only Results matters
Reaction score
74
Part 1
For your first trigger, I don't see anything wrong with the code, so I guess the problem lies in your dummy. Do as Exide mention and you should be fine.
I just shorten the code :D
Code:
Hail
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Hail 
    Actions
        Set Hail_Point = (Target point of ability being cast)
        Set Hail_Caster_Position = (Position of (Casting unit))
        Unit - Create 1 Hail for (Owner of (Casting unit)) at Hail_Caster_Position facing Default building facing degrees
        Unit - Turn collision for (Last created unit) Off
        Unit - Add Hail (Hail Effect) to (Last created unit)
        Unit - Set level of Hail (Hail Effect) for (Last created unit) to (Level of Hail  for (Casting unit))
        Unit - Order (Last created unit) to Human Archmage - Blizzard Hail_Point
        Unit - Add a (7.00 +  (3.00 X (Level of Hail  for (Casting unit)))) second Generic expiration timer to (Last created unit)
        Custom script:   call RemoveLocation (udg_Hail_Point)
        Custom script:   call RemoveLocation (udg_Hail_Caster_Position)



Part 2
Basically this trigger needs a major overhaul.
It contains 2 logical error:

Logic Error 1:
When you cast the ability on Unit A, it will add an Event of Unit A into your second trigger.
But when you cast the ability on Unit A again , it will add another Event into your 2nd trigger, Since there will be 2 events for Unit A, it will run the trigger twice... causing a logical error

Logic Error 2:
When you cast the ability on Unit A, it will add an Event of Unit A into your second trigger.
Next you cast the ability on Unit B, however, when Unit A takes damage, it will still be shield from damage, the event will run for Unit A since it has a corresponding event in the 2nd trigger.... this cause another logical error

I do not have WE in sight at the moment, so I can only edit via copy/paste.
If someone is kind enough to rework the trigger, please do so. If no one else helps, I will post the triggers when I get my hands on my WE.
 

PooBucket

New Member
Reaction score
12
1. That sounds mean jnZ! XD. Anyway I might redo the coding again....It just keeps sending one wave of Hail (Blizzard) down and stops.
2. Ahhhh... I see, thanks for pointing that out for me about the stacking event, how could I fix that spot? You can't remove an action or something can you? Cause I don't know what to do for that bit... Seems very tricky! :(
 

PooBucket

New Member
Reaction score
12
Plz Help

Bum.................................................................p

2. But however thankfully, when you said it would be gone if cast on another unit, it's got longer cooldown than the full duration. The only problem is I made an ability refresher oO
 

PooBucket

New Member
Reaction score
12
Can I bum..............p again? XD, plz I really need help on the second one, I can ditch the Hail ability ^^.
 

demotry241

Don't Ever Categorize Yourself.
Reaction score
105
1st one make it simple



create dummy unit w/ locust no model and flying
dummy(unit) skill make in no mana requirement and make it unit.~



event - unit cast an ability

condition - ability = the skill casted

action
set "position of caster" = position of caster
set "target" = position of ability being cast

create 1 dummy unit for owner of "casting unit" at "position of caster" facing "target"
add ability (dummy skill) to last created unit
set ability of (dummy skill) of last created unit to level of (skill) of casting unit

order last created ability to dummy skill at "target"

add expiration time to last created unit

destroy ALLL LEAKS now.
 

PooBucket

New Member
Reaction score
12
Don't want to sound mean, but ****, can people read these days.... The first one is already done (well, ditched) cause I've got an Ice Spiral spell THE_X made for me. I really need help on the second one however.....
 

PooBucket

New Member
Reaction score
12
How long does it take to someone notice this thread and help? I know there's an answer cause it's just like Dota's Aphotic Shield.
 

demotry241

Don't Ever Categorize Yourself.
Reaction score
105
just find the skill in the resource with the ability of aphotic shield then
just created a dummy unit and order the dummy unit to cast aphotic shield to picked units.
 

PooBucket

New Member
Reaction score
12
just find the skill in the resource with the ability of aphotic shield then
just created a dummy unit and order the dummy unit to cast aphotic shield to picked units.

Hello? I've got the absorbing all correct I only need the special effect? I can't read JASS cause I don't know it anyway. Aphotic Shield is made in JASS in IceFrog's Dota Map.
 

demotry241

Don't Ever Categorize Yourself.
Reaction score
105
IF You Just want the SPecial Effects


add an ability = aura= self then make art target = Your effect



and just remove the ability after the shield is gone.
 

PooBucket

New Member
Reaction score
12
The problem is, the ability won't do anything either. I want the special effect to be gone once the shield has absorbed the maximum damage possible or once the seconds are up. And the other thing about the stacking events, I need that fixed up too. Anyone care to help? Thanks. :thup:
 
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