HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Problem with rupture like spell

04-25-2007, 12:53 PM#1
Martin Barbov
I use the following trigger to make the spell
Trigger:
Unit starts casting an ability

ability being cast equal to charge

create 1 dummy at the position of casting hero
set distancecalculator = last created unit

and the main trigger
Trigger:
unit starts the effect of an ability

ability being cast equal to charge

order casting unit to damage target unit of ability being cats for {0.2*distance between(distace calculator) and casting unit}

The spell must do 20 % of the distance in damage but it do nothing
04-25-2007, 01:07 PM#2
CommanderZ
Why do you calculate damage in extra trigger? Couln't it be in the second one as well? Why do you use dummy?

Btw, use Edit -> Copy as text. I will be much more readable.
04-25-2007, 01:25 PM#3
Zwan
You need an end point. If its a unit target you need to damage between dummy and target unit of ability being cast. If its a point, then dummy to target point of ability being cast.

right click your trigger and choose copy as text, then paste it here with the trigger tags and it will be easier to help.
04-25-2007, 02:01 PM#4
Martin Barbov
Trigger:
charge setting
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Charge
Collapse Actions
Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
Set chargedistancecalculator[(Player number of (Owner of (Casting unit)))] = (Last created unit)

and

Trigger:
charge level 3
Collapse Events
Unit - A unit Finishes casting an ability
Collapse Conditions
(Level of Unknown (A009) for (Casting unit)) Equal to 3
(Ability being cast) Equal to Charge
Collapse Actions
Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (0.20 x (Distance between (Position of chargedistancecalculator[(Player number of (Owner of (Casting unit)))]) and (Position of (Target unit of ability being cast)))) damage of attack type Spells and damage type Normal
Floating Text - Create floating text that reads (String((100.00 + (Real((Integer((Distance between (Position of chargedistancecalculator[(Player number of (Owner of (Casting unit)))]) and (Position of (Casting unit)))))))))) above (Target unit of ability being cast) with Z offset 2.00, using font size 10.00, color (100.00%, 1.00%, 1.00%), and 0.00% transparency
Wait 1.20 game-time seconds
Floating Text - Destroy (Last created floating text)
Unit - Remove chargedistancecalculator[(Player number of (Owner of (Casting unit)))] from the game

Also there is a problem with the floating text
It always shows in the middle of the map


I just created a second problem
Trigger:
Phantom Energy
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
(Level of Phantom Energy for (Attacking unit)) Equal to 1
Goblin Equal to (Unit-type of (Attacking unit))
(Learned Hero Skill) Equal to Phantom Energy
Collapse Actions
Special Effect - Create a special effect attached to the chest of (Attacked unit) using Abilities\Spells\Other\BreathOfFrost\BreathOfFrostTarget.mdl
Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (0.12 x (Mana of (Attacking unit))) damage of attack type Spells and damage type Normal

This is my friend's spell wich do absolutely nothing.
04-25-2007, 02:24 PM#5
Thunder_Eye
Quote:
Originally Posted by Martin Barbov
Trigger:
(Learned Hero Skill) Equal to Phantom Energy

This can't be used with that event., remove it.
04-25-2007, 03:39 PM#6
Martin Barbov
Quote:
Originally Posted by Thunder_Eye
This can't be used with that event., remove it.

As I think of it you are right. But what about the Charge. I just saw that in the charge triggers instead of charge it checks UNKNOWN. It's because i' tried with different starting ability and forgot to change the trigger. Now I fixed it and voila-the same not working ability. The floating text bug is a mystery to me.
The strangest think is that the floating text calculates the damage correctly. It's just not inflicted on the target. One more question. Can I make the text say
180 for example not 180.000
04-25-2007, 04:07 PM#7
blu_da_noob
Change the event on the charge level 3 trigger to 'A unit start's the effect of an ability'. So get the number as an integer, convert real to integer and then integer to string.

For the phantom energy problem, there is no 'Learned Hero Skill' so it cannot be equal to 'Phantom Energy' so the conditions will never be true.
04-30-2007, 02:56 PM#8
Martin Barbov
At last. it work.
I couldn't run it with your triggers. I found another way.Just used unit is ordered targeting an object instead of starts casting an ability.Now it works with only one little problem-the floating text. It is too correct. Now it shows 135.400 for example. I want it to be just 135 - like a critical hit. Can it be done or I should use something else instead of floating text
04-30-2007, 04:51 PM#9
Zwan
ya, track the damage as an integer and use that value for the floating text.
05-01-2007, 02:10 PM#10
Martin Barbov
Thanks.