Critical Damage to single target

parmsib

New Member
Reaction score
0
What i want to do isto make a spell where the target of the caster gets gets stuck on some sort of hill. When the caster attacks the target he will do multiple damage based on the level of his ability and if anyone else trys to attack it, the attacker will be ordered to stop.

My problem come swhen i'm trying this in-game Wc3 crashes and the game exits itself.

Here is my trigger so far:
SCone
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Sand Coffin
Actions
Set SC_caster = (Casting unit)
Set SC_target = (Target unit of ability being cast)
Unit - Pause SC_target
Unit - Add Crow Form to SC_target
Unit - Remove Crow Form from SC_target
Animation - Change SC_target flying height to 1.00 at 0.50
Environment - Create a 0.50 second Permanent crater deformation at (Position of SC_target) with radius 100.00 and depth -200.00
Trigger - Turn on SCnoone else attack <gen>
Trigger - Turn on SCdamage amplifier <gen>
Wait 2.00 seconds
Trigger - Turn off SCdamage amplifier <gen>
Trigger - Turn off SCnoone else attack <gen>
Environment - Create a 0.10 second Permanent crater deformation at (Position of SC_target) with radius 100.00 and depth 200.00
Unit - Unpause SC_target

SCnoone else attack
Events
Unit - A unit Is attacked
Conditions
(Attacked unit) Equal to SC_target
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Attacking unit) Equal to SC_caster
Then - Actions
Trigger - Add to SCdamage amplifier <gen> the event (Unit - (CS_target) Takes damage)
Else - Actions
Unit - Order (Attacking unit) to Stop

SCdamage amplifier
Events
Conditions
(Damage source) Equal to SC_caster
Actions
Special Effect - Create a special effect at (Position of SC_target) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Unit - Cause SC_caster to damage SC_target, dealing ((Damage taken) x (Real((Level of Sand Coffin for SC_caster)))) damage of attack type Normal and damage type Normal

Im new to the way of adding events to triggers to get the damage done. I've searched a bit and i found nothing that multiplied or added damage to a specific unit.
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
its right but add your events in the casting trigger and maybe a crater with -X depth causes the crash
 

R@i_no_Wyrm

New Member
Reaction score
43
>(CS_target) --> in 2nd trigger (??? what is CS_target?)

>Environment - Create a 0.50 second Permanent crater deformation at (Position of SC_target) with radius 100.00 and depth -200.00
This leaks

The problem is : SC target is attacked, so SCdamage amplifier get an event as follows :
E - SC_target takes damage.

Now the SC_caster damages SC_target again, so the 3rd trigger works again, without ending.

See?

How to fix : Make a locust to damage the target upon attack, or
(darkrae's trigger)

SCdamage amplifier
Events
Conditions
(Damage source) Equal to SC_caster
Actions
Special Effect - Create a special effect at (Position of SC_target) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Trigger - turn off (SCdamage amplifier)
Unit - Cause SC_caster to damage SC_target, dealing ((Damage taken) x (Real((Level of Sand Coffin for SC_caster)))) damage of attack type Normal and damage type Normal
Trigger - turn on (SCdamage amplifier)
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Now I see the problem.
As R@i_no_Wyrm pointed, you deal damage to the unit using the trigger, thus causing the trigger to repeat itself (because the unit gets damaged again) causing an endless loop >> crash

What I said was just rephrasing what R@i_no_Wyrm said, actually.
(where did you get that trigger from? @Post #5 ___ o_O)

And yes, there's another problem with SC_Target and CS_Target (see your 2nd trigger)
Is that just a typo or is it a completely different variable?
 

parmsib

New Member
Reaction score
0
Thanks!
I see the problem, im gonna fix it now.

Oops, that cs/sc_target was a typo, sry.
EDIT: the flying height was an experiment to see if the target stayd under the ground, as flying units do that... but it failed :(
 

R@i_no_Wyrm

New Member
Reaction score
43
The trigger is from the someonesneaking before, u use that concept after I pointed the problem. This is an exactly the same trouble tough.
 

Frozenwind

System maker
Reaction score
99
EDIT: the flying height was an experiment to see if the target stayd under the ground, as flying units do that... but it failed :(

You mean that you couldnt change the flying height of a ground unit?
In that case you should simply add this ability: "crow form" and remove it right away.
It's bugged, so the game thinks you're an air unit (not like: targetted as air or fly over stuff, but just so you can change flying height).

Code:
Events
    Time - elapsed game time is 0.00 seconds
Conditions
Actions
    Unit - Add crowform to >[COLOR="Red"]your unit[/COLOR]<
    Unit - Remove crowform from >[COLOR="Red"]your unit[/COLOR]<

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