Blink Strike Tutorial

General discussion of Warcraft 3. Threads may may be posted here if they don't fit into the other sections.

Moderator: Cheaters

User avatar
Joshsta818
Member
Posts: 86
Joined: April 7th, 2007, 2:39 am

Blink Strike Tutorial

Post by Joshsta818 »

This Tutorial will show you how to make a blink strike spell, where a unit "Blinks" to a target, and deals damage depending on the level of the ability. Simple? Well yes its simple but you have to have knowledge of variables to create it, so i will show you how.

Variables
Blink_Strike_Caster. Unit(Array) <- Will Be Caster
Blink_Strike_Target. Unit(Array) <- Will be Target Of Caster
TempLoc00, Point(Array) <- Will Be Where You Teleport To
AbilityLevel, Real(Array) <- Will Determine Level Of Blink Strike
BlinkDamage, Real(Array) <- Will Determine Damage Delt

First
Make the Ability, you can use alot of differant abilities, just make sure you make its "Targets Allowed" to the correct setting.
Then make an ability event.

Code: Select all

Events
    Unit - A unit Starts the effect of an ability
this event is triggered when a unit casts an ability.

Second

Code: Select all

Conditions
    (Ability being cast) Equal to Blink Strike 
This condition is very important, it makes it so the trigger will ONLY go off when "Blink Strike" is cast.

Third, Now you need to start creating variables. i will walk you through it inside of the actions.

Code: Select all

Actions
    -------- Sets Caster in a Variable --------
    Set Blink_Strike_Caster[1] = (Casting unit)
    -------- Sets Target in a Variable --------
    Set Blink_Strike_Target[1] = (Target unit of ability being cast)
    -------- Sets Location in a Variable --------
    Set TempLoc00[1] = (Position of (Target unit of ability being cast))
    -------- Sets Ability Level in a Variable --------
    Set AbilityLevel[1] = (Real((Level of Blink Strike  for Blink_Strike_Caster[1]))) This is used when you want your ability to deal damage based on the level of the ability.
    -------- Sets Damage in a Variable --------
    Set Blink_Damage[1] = 30.00
    -------- Start the Spell --------
    Animation - Play Blink_Strike_Caster[1]'s spell animation <--Makes the Spell Look better
    Unit - Move Blink_Strike_Caster[1] instantly to TempLoc00[2] <-- Moves Caster To Target
    Unit - Cause Blink_Strike_Caster[1] to damage Blink_Strike_Target[1], dealing (AbilityLevel[1] x Blink_Damage[1]) damage of attack type Normal and damage type Normal <-- Damages target dealing 30xThe Level Of the Ability, Ex; Level 1x30=30, Level 2x30=60, Level 3x30=90, Level 4x30=120.
    Unit - Order Blink_Strike_Caster[1] to Attack Blink_Strike_Target[1] <-- Makes caster continue atacking the target.
    Special Effect - Create a special effect at (Position of Blink_Strike_Target[1]) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
    Animation - Play Blink_Strike_Caster[1]'s attack animation
    Custom script:   call RemoveLocation(udg_TempLoc00[1]) <-- Removes leaks(removes the stored location)
Now, if you wanted to have more than 1 hero with this ability you would just Copy the orig Blink Strike ability, Paste it, Add a Editor suffix to it so you can easily figure out which is which. Then copy the trigger, paste it, make SURE you set up the new trigger with the correct Blink Strike ability. Then change all of the arrays in the triggers variables to like 2, heres an Example:

Code: Select all

Events
    Unit - A unit Starts the effect of an ability
Conditions
    (Ability being cast) Equal to Blink Strike (Templar)
Actions
    -------- Sets Caster in a Variable --------
    Set Blink_Strike_Caster[2] = (Casting unit)
    -------- Sets Target in a Variable --------
    Set Blink_Strike_Target[2] = (Target unit of ability being cast)
    -------- Sets Location in a Variable --------
    Set TempLoc00[2] = (Position of (Target unit of ability being cast))
    -------- Sets Ability Level in a Variable --------
    Set AbilityLevel[2] = (Real((Level of Blink Strike  for Blink_Strike_Caster[1])))
    -------- Sets Damage in a Variable --------
    Set Blink_Damage[2] = 30.00
    Animation - Play Blink_Strike_Caster[2]'s spell animation
    Unit - Move Blink_Strike_Caster[2] instantly to TempLoc00[2]
    Unit - Cause Blink_Strike_Caster[2] to damage Blink_Strike_Target[2], dealing (AbilityLevel[2] x Blink_Damage[2]) damage of attack type Normal and damage type Normal
    Unit - Order Blink_Strike_Caster[2] to Attack Blink_Strike_Target[2]
    Special Effect - Create a special effect at (Position of Blink_Strike_Target[2]) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
    Animation - Play Blink_Strike_Caster[2]'s attack animation
    Custom script:   call RemoveLocation(udg_TempLoc00[2])
Please point out if i made any errors.
You do not have the required permissions to view the files attached to this post.
Image
WhiteSkidMaul Wars
~Now Gone Superspeed!~
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Blink Strike Tutorial

Post by Arabidnun »

This is more of a "Your Work" Kinda thing.