TPOX
New Member
- Reaction score
- 10
Im having a problem with a spell ive made, it is supposed to look like hero shoots missles at an enemy that follow him and blow up after a certain time limit. Problem is that the first (dummy unit-these are the missles) runs to the place where the target unit was and blows up after 12 and the rest of the dummy unit missles just drop underneath him.
Also is there a correct math problem for to go from height of hero to height of target depending on the distance so if he was close it would go down to height of target fast but if he was far it would be a slower rate or something that would look the same as if u used a normal spell that had projectiles that have homing.
Heres the trigger but i dont know whats wrong with it
EDIT- I would also rather have the missle kaboom instead of attack (dummy unit has kaboom ability) but it didnt work right either.
Also is there a correct math problem for to go from height of hero to height of target depending on the distance so if he was close it would go down to height of target fast but if he was far it would be a slower rate or something that would look the same as if u used a normal spell that had projectiles that have homing.
Heres the trigger but i dont know whats wrong with it
Code:
Heat Sink
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Heat Sink
Actions
Set CastingUnit_HeatSink = (Casting unit)
Set TargetUnitOfAbilityBeingCast = (Target unit of ability being cast)
For each (Integer A) from 1 to (Level of Heat Sink for CastingUnit_HeatSink), do (Actions)
Loop - Actions
Unit - Create 1 Heat Sink Dummy for (Owner of CastingUnit_HeatSink) at (Position of CastingUnit_HeatSink) facing (Position of (Target unit of ability being cast))
Set DummyUnit_HeatSink = (Last created unit)
Animation - Change DummyUnit_HeatSink flying height to (Current flying height of CastingUnit_HeatSink) at 0.00
Animation - Change DummyUnit_HeatSink flying height to (Current flying height of TargetUnitOfAbilityBeingCast) at 250.00
Unit - Set Level of Heat Sink (Dummy) for DummyUnit_HeatSink to 1
Unit - Order DummyUnit_HeatSink to Attack (Target unit of ability being cast)
Unit - Add a 12.00 second Generic expiration timer to DummyUnit_HeatSink
Set DummyUnit_HeatSink = No unit
Wait 0.60 seconds
EDIT- I would also rather have the missle kaboom instead of attack (dummy unit has kaboom ability) but it didnt work right either.


