• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

World editor Dota abaddon ability (pls help game crashing for some reason)

Status
Not open for further replies.
Level 3
Joined
Mar 5, 2016
Messages
25
i been working on abaddon ultimate i wrote a perfect trigger but game always crashing every time any idea ? here is the trigger:

Borrowed Time:

Event;Unit - A unit begins casting an ability

Conditions;Ability being cast equal to Burrowed Time

Actions; Set Burrowtimemaxhp = (life of (Casting Unit))
Trigger - Turn on Burrowed time action <gen>
Wait 4 game time seconds
Trigger - Turn off Burrowed time action <gen>



Burrowed Time action

Event;Unit - Arthas 0000<gen> Takes damage

Action; Unit- Cause (attacked unit) to damage (attacked unit) dealing((Burrowtimemaxhp - ((Life of(attacked unit))x-1)x2) damage to

Set Burrowtimemaxhp =(life of (Arthas evil))




The idea is quite hard to understand let me explain when abaddon casts burrow time game saves his hp and doing this math (Saved hp-after damage taken hp) X 2 as heal him and saving his after damage hp as saved hp so its repeating well but its crashing game... hope someone figure it out
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
To post triggers, please check out the How to easily post triggers tutorial. This should also be moved to Triggers & Scripts.

To get back on topic, the reason the game crashes is because you have an infinite loop. When Arthas 0000 takes damage, you order the attacking unit to damage Arthas 0000 again, which runs the trigger another time. As you can see, this trigger will run fooooooooorever. An easy fix would be to add Turn off (This trigger) before you damage them, and then Turn on (This trigger) afterwards. You could also just use "Unit - Set life of unit to (current health + damage dealt)" instead of dealing negative damage.

If I may make other suggestions, use "A unit Starts the effect of an ability" as the event and you should consider a damage detection system to recreate Abbadon's ultimate.
 
Level 3
Joined
Mar 5, 2016
Messages
25
#KILLCIDE well activating event as effect is an good idea but problem is what if its dispelled ?


-and at other hand i could use that Unit - Set life of unit to (current health + damage dealt) thank you for that good sir.

Question: If i do that "effect" as a aura is it still works ?
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
#KILLCIDE well activating event as effect is an good idea but problem is what if its dispelled ?
I'm a little confused. What do you mean dispelled? Abadon's ultimate is an instant cast spell. Are you referring to the buff given by the ultimate being dispelled? If so, that has nothing to do with using UNIT_SPELL_EFFECT over SPELL_CAST.


If i do that "effect" as a aura is it still works ?
Do you mean having it as a passive ability constantly running instead of a temporary buff?
 
Level 3
Joined
Mar 5, 2016
Messages
25
"I'm a little confused. What do you mean dispelled? Abadon's ultimate is an instant cast spell."

For example abaddon's Burrowed time ability is "Roar" when he casts event will response when that effect is on what if someone casts dispell ability and remove that effect so the event will end ?


Do you mean having it as a passive ability constantly running instead of a temporary buff?

For example adding instantly devoation aura ability when burrow time on ,and end of burrow time, removing devoation aura
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
For example abaddon's Burrowed time ability is "Roar" when he casts event will response when that effect is on what if someone casts dispell ability and remove that effect so the event will end ?
Depends on how you have your triggers setup. If you are checking for the buff given by roar, then yes the event will end. However from what I can see, you only turn on the trigger that heals the unit based on damage dealt, and then turn off a few seconds later. In that case, the event will not end.

This still has nothing to do with my suggestion of using "A unit Starts the effect of an ability" over "A unit Begins casting an ability".

For example adding instantly devoation aura ability when burrow time on ,and end of burrow time, removing devoation aura
You could do that, however the "devotion aura" ability icon will show up in the command card. I recommend using Tornado (Aura) since it has a buff indicator without appearing on the command card.
 
Level 3
Joined
Mar 5, 2016
Messages
25
Well is there a way to cast "Burrow time" when abaddon's hp below 400 ?

but he must cast this even he is not avaible to cast(example:when he silented)
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Off the top of my head, you can just add a condition that checks the current HP of the unit. If it is below 400, run Borrowed Time triggers. I'm not entirely sure how the "cooldown" for this approach will work.

Again, I really suggest using a DDS for this because you can null the damage just in case the damage dealt isn't a killing blow. For example, if you don't use a DDS and the next damage dealt is 400 or 401, it will kill the unit instead of running the triggers.
 
Level 3
Joined
Mar 5, 2016
Messages
25
Well i made it cheap but effective idea but its works

even; if units effected by silencing,sheep...etc

Give unit spell imnunity
Dispell unit
İssue order cast ultimate

thank you for your help anyway this spell works with your help :D
 
Level 12
Joined
Jan 2, 2016
Messages
973
i been working on abaddon ultimate i wrote a perfect trigger but game always crashing every time any idea ? here is the trigger:

Borrowed Time:

Event;Unit - A unit begins casting an ability

Conditions;Ability being cast equal to Burrowed Time

Actions; Set Burrowtimemaxhp = (life of (Casting Unit))
Trigger - Turn on Burrowed time action <gen>
Wait 4 game time seconds
Trigger - Turn off Burrowed time action <gen>



Burrowed Time action

Event;Unit - Arthas 0000<gen> Takes damage

Action; Unit- Cause (attacked unit) to damage (attacked unit) dealing((Burrowtimemaxhp - ((Life of(attacked unit))x-1)x2) damage to

Set Burrowtimemaxhp =(life of (Arthas evil))




The idea is quite hard to understand let me explain when abaddon casts burrow time game saves his hp and doing this math (Saved hp-after damage taken hp) X 2 as heal him and saving his after damage hp as saved hp so its repeating well but its crashing game... hope someone figure it out

Okay, when you are using "A unit takes damage" as event - you need to use "Damage source" and "Damaged unit" instead of "Attacking unit" and "Attacked Unit".

Furthemore instead of damaging arthas and causing an endless loop (making the trigger run over an over again, causing it to crash the game), you can just use "Set Arthas' life to ( Arthas' life + ( 2 x ( Dmage Dealt ) ) )"

As for "activating the ultimate when he's under 400 HP" - make another trigger - Event: Arthas' life reaches value less than 400
Actions: Cause Arthas to .........
where ........... is the order to cast the ability.
 
Status
Not open for further replies.
Top