HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

blink strike kinda...

05-29-2006, 09:13 PM#1
map-maker
well im trying to make something like a blink strike. the unit is supposed to blink halfway into the air between himself and the point where you cast than come down and attack the ground at that point. it all works fine except it doesnt blink the unit halfway in between it actually blinks him BEHIND where he started which messes up the gradual height decrease and he ends up sliding on the ground for most of the time. here are both of the triggers i use, i hope someone can tell me whats wrong:
Trigger:
start
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Blink Strike
Collapse Actions
Set blinkunit = (Casting unit)
Set temppoint = (Target point of ability being cast)
Set blinkdistance = (Distance between (Position of blinkunit) and temppoint)
Unit - Add Storm Crow Form to blinkunit
Unit - Remove Storm Crow Form from blinkunit
Unit - Turn collision for blinkunit Off
Special Effect - Create a special effect attached to the origin of blinkunit using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Move blinkunit instantly to ((Position of blinkunit) offset by (blinkdistance x 0.50) towards (Angle from temppoint to (Position of blinkunit)) degrees)
Unit - Hide blinkunit
Animation - Change blinkunit flying height to 500.00 at 0.00
Special Effect - Create a special effect attached to the origin of blinkunit using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
Unit - Unhide blinkunit
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the weapon of blinkunit using Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
Set blinkeffect = (Last created special effect)
Animation - Change blinkunit's animation speed to 0.00% of its original speed
Animation - Play blinkunit's Attack Slam animation
Unit - Pause blinkunit
Trigger - Turn on come down <gen>

and
Trigger:
come down
Collapse Events
Time - Every 0.01 seconds of game time
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Distance between (Position of blinkunit) and temppoint) Greater than 50.00
Collapse Then - Actions
Unit - Move blinkunit instantly to ((Position of blinkunit) offset by 10.00 towards (Angle from (Position of blinkunit) to temppoint) degrees)
Animation - Change blinkunit flying height to ((Current flying height of blinkunit) - (blinkdistance / 50.00)) at 0.00
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Distance between (Position of blinkunit) and temppoint) Less than or equal to 50.00
Collapse Then - Actions
Unit - Unpause blinkunit
Animation - Change blinkunit's animation speed to 100.00% of its original speed
Animation - Play blinkunit's attack slam animation
Special Effect - Create a special effect at temppoint using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
Unit - Order blinkunit to damage area in 0.00 seconds of size 200.00 at temppoint for ((Real((Level of Blink Strike for blinkunit))) x 75.00) using attack type Chaos and damage type Sonic.
Special Effect - Destroy blinkeffect
Special Effect - Destroy (Last created special effect)
Trigger - Turn off come down <gen>
Collapse Else - Actions
Do nothing
oh and also for some reason it still doesnt seem to be turning his collision off because he gets stuck whenever he hits something..
05-29-2006, 09:22 PM#2
The)TideHunter(
Your code looks fine, nothing should go wrong, very odd.

Try replacing the line:

Trigger:
Unit - Move blinkunit instantly to ((Position of blinkunit) offset by (blinkdistance x 0.50) towards (Angle from temppoint to (Position of blinkunit)) degrees)

with:

Trigger:
Unit - Move blinkunit instantly to ((Position of blinkunit) offset by (blinkdistance / 0.50) towards (Angle from temppoint to (Position of blinkunit)) degrees)

Replace the times by divide, i agree with the times, but its worth a try.
I would try doing the opposite if your unit is going on the opposite side :)
05-29-2006, 09:26 PM#3
map-maker
that wouldnt make it go half way of course...say the distance between the caster and the point he casted on was 500. by multiplying it by 0.5 or dividing it by 2 (i have tried both) it should give the number 250 and move him by that offset if you divide by 0.5 you get 1000... i guess ill try it though..see what happens. can u help me on the collision part?

EDIT: i just tested that out and it moved him 1000 backwards O.o think maybe something is returning the angle wrong?

EDIT2: haha wow WE is picky. so it seemed it was returning the OPPOSITE angel that i wanted because i told it to take the angle from the point to the unit instead of the unit to the point. fixed that part now. can someone help me with the collision problem
05-29-2006, 09:39 PM#4
TaintedReality
Trigger:
Unit - Move blinkunit instantly to ((Position of blinkunit) offset by (blinkdistance x 0.50) towards (Angle from temppoint to (Position of blinkunit)) degrees)

Should be:
Trigger:
Unit - Move blinkunit instantly to ((Position of blinkunit) offset by (blinkdistance x 0.50) towards (Angle from (Position of blinkunit) to temppoint) degrees)

Before you were using the angle from the target location to the casting unit, therefore making him go backwards. You want to move from his original location towards the target location, so you need it that way. Hope that works.

Edit: Damn, posted at the same time you edited =P.
05-29-2006, 09:45 PM#5
The)TideHunter(
Ok glad that works.
But what do you mean by Collision?
I see no collision in your spell =/

EDIT: I realised im blind, i see collision!
Whats wrong with the collision? Thats the correct question :)