- Joined
- Jun 19, 2008
- Messages
- 18
Introduction:
this tutorial will show you how to create a knockback, just like the title says.
titles do not lie, never doubt the title
First off we need to create a spell that triggers the knockback sequence. I like to use Storm Bolt it has a nice stun so when your target's getting knocked backwards he's not squirming around.
Go into object editor, click the abilities tab, and create new custom abilities. Scroll down the list untill you see Storm Bolt.(there are 2 storm bolts but either is fine) no need to modify anything, you can go back to it later.
Okay, now we need to open up trigger editor and create a few variables. Click the yellow X at the top (between the Redo arrow and the New Catagory tab). Click the green X with the arrow pointing to the left (<-X).
1st Variable: Lets call this variable 'Caster' (the caster of the spell that knocks the unit back) and make the Variable Type 'Unit'. DO NOT make it an array, it will screw up the whole trigger if you do.
2nt Variable: Lets call this variable 'Target' (the target of the Knockback spell being cast). Make this Variable Type 'Unit' as well. don't make this variable an array either
3rd Variable: Lets call this variable 'Location' (the point in which the target is getting knocked backwards into) and make this Variable Type 'Point'. once againDO NOT make it an array.
Okay, now we need to make the trigger that will hold the Knockback. Lets just call it 'Knockback' (short and sweet).
Next, press Ctrl+E, Click the red flag at the top of the editor, or left click the text reading Events, scroll down, and click New Event. (either will do). Scroll down and select 'Generic unit event'. Click 'Unit' then scroll down to 'A unit Starts the effect of an ability.' It should look like this:
Okay, now find the box with a check in it that says 'Initialy On' next to it. UNCHECK it, you'll see why it can't be initially on in a second.
Create a new Event, make it a 'Periodic Event,' click the blue text reading 2.00 and set it to 0.04. Why 0.04 you ask? It runs really smoothly and I use it for all my knockingbacking. It should look like this so far:
Knockback
Okay, now pay MEGA attention to this Action, its really tricky. Okay, first: create a new Action and scroll down to 'Move Unit (Instantly).' Select the blue text that reads '(Triggering Unit)' and put the Variable 'Target.' Next, click the blue text that reads '(Center Of (Playable Map Area)),' scroll down to 'Point With Polar Offset.' Click the blue text that reads '(Center Of (Playable Map Area))' and select the Variable Location. Click the blue text that reads '256.00.' Click the first blue text that reads '1.00' then scroll down to 'Math - Distance Between Points.' Click the blue text that reads '(Position Of (Triggering Unit))' and use the variable Location then find the blue text that reads 'Position Of (Triggering Unit))' and make it 'Position of (the variable) Target.' Click Ok. Next, find the blue text that reads '1.00' on the right side and type in the number '5.' (we want the trigger to increase by 5 every 0.04 seconds) trust me. you want that number. Now, click on the blue text that reads '0.00' and scroll down to 'Math - Angle Between Points.' Click the first blue text that reads '(Position Of (Triggering Unit))' and select the Variable Location. Click ok. Click the second blue text that reads '(Position Of (Triggering Unit))' and select 'Position of (the Variable)Target.' Click 'OK' a bunch of times, youre done with that action....finally.
you might need to read that over again a couple times
Here is what it should look like so far:
Knockback
Lets go back to the first trigger, Knockback. We need to enable the trigger Push in order for the knockback to work. Create a new action, scroll down to Trigger - Turn On. Click the blue text that reads 'This Trigger' then select the Variable 'Push <gen>.' Here's how it should look so far:
Knockback
Knockback
Knockback
For Target do the same exact thing as Caster except where it says Caster, type Target. Custom Script: 'call RemoveUnit(udg_Target)'
For Location we have to do something a little different. Caster and Target are both the same type of variables, we based them both off of units. Location is a point, therefore it requires a different custom script. You would think we would type RemovePoint, but no its actually RemoveLocation. Custom Script: 'call RemoveLocation(udg_Location)' Here's what it looks like with custom scripts:
Knockback
Special Effect: this is how you make a special effect. Create a new Action, scroll down to 'Create Special Effect On Unit.' Click on the blue text that reads 'overhead' and type in 'origin,' trust me, you wanna do this. Click on the blue text that reads '(Triggering Unit)' and put the Variable 'Target.' Click on the blue text that reads 'Abilities\Spells\Other\TalkToMe\TalkToMe.mld' then click on the button at the bottom that reads 'Choose Model' and put any effect you want. I, personally, like the ToonBoom effect, when it repeats rapidly in the knockback it creates an admirable piece of genius
Author's Note: I'm sorry that I did not put any screenshots, the fact of the matter is: i dont know how. I hope is tutorial helps, thanks for reading. GO NUTS
p.s. The reason i don't go into too much detail on why I put things the way I did is because i believe that newer or maybe even more experience map makers could learn more from dissecting my triggers than having everything laid out in front of them
BLOOD ELFS 4 LIFE
this tutorial will show you how to create a knockback, just like the title says.
titles do not lie, never doubt the title
First off we need to create a spell that triggers the knockback sequence. I like to use Storm Bolt it has a nice stun so when your target's getting knocked backwards he's not squirming around.
Go into object editor, click the abilities tab, and create new custom abilities. Scroll down the list untill you see Storm Bolt.(there are 2 storm bolts but either is fine) no need to modify anything, you can go back to it later.
Okay, now we need to open up trigger editor and create a few variables. Click the yellow X at the top (between the Redo arrow and the New Catagory tab). Click the green X with the arrow pointing to the left (<-X).
1st Variable: Lets call this variable 'Caster' (the caster of the spell that knocks the unit back) and make the Variable Type 'Unit'. DO NOT make it an array, it will screw up the whole trigger if you do.
2nt Variable: Lets call this variable 'Target' (the target of the Knockback spell being cast). Make this Variable Type 'Unit' as well. don't make this variable an array either
3rd Variable: Lets call this variable 'Location' (the point in which the target is getting knocked backwards into) and make this Variable Type 'Point'. once againDO NOT make it an array.
Okay, now we need to make the trigger that will hold the Knockback. Lets just call it 'Knockback' (short and sweet).
Next, press Ctrl+E, Click the red flag at the top of the editor, or left click the text reading Events, scroll down, and click New Event. (either will do). Scroll down and select 'Generic unit event'. Click 'Unit' then scroll down to 'A unit Starts the effect of an ability.' It should look like this:
-
Events
- Unit - A unit Starts the effect of an ability
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Knockback
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Knockback
-
Actions
- Set Caster = (Triggering unit)
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Knockback
-
Actions
- Set Caster = (Triggering unit)
- Set Target = (Target unit of ability being cast)
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Knockback
-
Actions
- Set Caster = (Triggering unit)
- Set Target = (Target unit of ability being cast)
- Set Location = (Position of Caster)
Okay, now find the box with a check in it that says 'Initialy On' next to it. UNCHECK it, you'll see why it can't be initially on in a second.
Create a new Event, make it a 'Periodic Event,' click the blue text reading 2.00 and set it to 0.04. Why 0.04 you ask? It runs really smoothly and I use it for all my knockingbacking. It should look like this so far:
Knockback
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Knockback
-
Actions
- Set Caster = (Triggering unit)
- Set Target = (Target unit of ability being cast)
- Set Location = (Position of Caster)
-
Events
- Time - Every 0.04 seconds of game time
Okay, now pay MEGA attention to this Action, its really tricky. Okay, first: create a new Action and scroll down to 'Move Unit (Instantly).' Select the blue text that reads '(Triggering Unit)' and put the Variable 'Target.' Next, click the blue text that reads '(Center Of (Playable Map Area)),' scroll down to 'Point With Polar Offset.' Click the blue text that reads '(Center Of (Playable Map Area))' and select the Variable Location. Click the blue text that reads '256.00.' Click the first blue text that reads '1.00' then scroll down to 'Math - Distance Between Points.' Click the blue text that reads '(Position Of (Triggering Unit))' and use the variable Location then find the blue text that reads 'Position Of (Triggering Unit))' and make it 'Position of (the variable) Target.' Click Ok. Next, find the blue text that reads '1.00' on the right side and type in the number '5.' (we want the trigger to increase by 5 every 0.04 seconds) trust me. you want that number. Now, click on the blue text that reads '0.00' and scroll down to 'Math - Angle Between Points.' Click the first blue text that reads '(Position Of (Triggering Unit))' and select the Variable Location. Click ok. Click the second blue text that reads '(Position Of (Triggering Unit))' and select 'Position of (the Variable)Target.' Click 'OK' a bunch of times, youre done with that action....finally.
you might need to read that over again a couple times
Here is what it should look like so far:
Knockback
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Knockback
-
Actions
- Set Caster = (Triggering unit)
- Set Target = (Target unit of ability being cast)
- Set Location = (Position of Caster)
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
- Unit - Move Target instantly to (Location offset by ((Distance between Location and (Position of Target)) + 5.00) towards (Angle from Location to (Position of Target)) degrees)
Lets go back to the first trigger, Knockback. We need to enable the trigger Push in order for the knockback to work. Create a new action, scroll down to Trigger - Turn On. Click the blue text that reads 'This Trigger' then select the Variable 'Push <gen>.' Here's how it should look so far:
Knockback
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Knockback
-
Actions
- Set Caster = (Triggering unit)
- Set Target = (Target unit of ability being cast)
- Set Location = (Position of Caster)
- Trigger - Turn On Push <gen>
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
- Unit - Move Target instantly to (Location offset by ((Distance between Location and (Position of Target)) + 5.00) towards (Angle from Location to (Position of Target)) degrees)
Knockback
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Knockback
-
Actions
- Set Caster = (Triggering unit)
- Set Target = (Target unit of ability being cast)
- Set Location = (Position of Caster)
- Trigger - Turn On Push <gen>
- Wait 1.00 game-time seconds
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
- Unit - Move Target instantly to (Location offset by ((Distance between Location and (Position of Target)) + 5.00) towards (Angle from Location to (Position of Target)) degrees)
Knockback
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Knockback
-
Actions
- Set Caster = (Triggering unit)
- Set Target = (Target unit of ability being cast)
- Set Location = (Position of Caster)
- Trigger - Turn On Push <gen>
- Wait 1.00 game-time seconds
- Trigger - Turn Off Push <gen>
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
- Unit - Move Target instantly to (Location offset by ((Distance between Location and (Position of Target)) + 5.00) towards (Angle from Location to (Position of Target)) degrees)
For Target do the same exact thing as Caster except where it says Caster, type Target. Custom Script: 'call RemoveUnit(udg_Target)'
For Location we have to do something a little different. Caster and Target are both the same type of variables, we based them both off of units. Location is a point, therefore it requires a different custom script. You would think we would type RemovePoint, but no its actually RemoveLocation. Custom Script: 'call RemoveLocation(udg_Location)' Here's what it looks like with custom scripts:
Knockback
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Knockback
-
Actions
- Set Caster = (Triggering unit)
- Set Target = (Target unit of ability being cast)
- Set Location = (Position of Caster)
- Trigger - Turn On Push <gen>
- Wait 1.00 game-time seconds
- Trigger - Turn Off Push <gen>
- Custom script: call RemoveUnit(udg_Caster)
- Custom script: call RemoveUnit(udg_Target)
- Custom script: call RemoveLocation(udg_Location)
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
- Unit - Move Target instantly to (Location offset by ((Distance between Location and (Position of Target)) + 5.00) towards (Angle from Location to (Position of Target)) degrees)
Special Effect: this is how you make a special effect. Create a new Action, scroll down to 'Create Special Effect On Unit.' Click on the blue text that reads 'overhead' and type in 'origin,' trust me, you wanna do this. Click on the blue text that reads '(Triggering Unit)' and put the Variable 'Target.' Click on the blue text that reads 'Abilities\Spells\Other\TalkToMe\TalkToMe.mld' then click on the button at the bottom that reads 'Choose Model' and put any effect you want. I, personally, like the ToonBoom effect, when it repeats rapidly in the knockback it creates an admirable piece of genius
Author's Note: I'm sorry that I did not put any screenshots, the fact of the matter is: i dont know how. I hope is tutorial helps, thanks for reading. GO NUTS
p.s. The reason i don't go into too much detail on why I put things the way I did is because i believe that newer or maybe even more experience map makers could learn more from dissecting my triggers than having everything laid out in front of them
BLOOD ELFS 4 LIFE
Last edited: