Monday, April 16, 2012

Custom Spell multi lvls

hey, just started getting into making custom spells using triggers instead of just modding already existing spells (eg. make cluster rockets fire 100 sheep in a huge area), and now i have become stuck. i managed to get a skill so my dude moves instantly from enemy to enemy attacking (quite a popular skill with custom maps :P) but i dont know how to set it up so when you add a skill point onto it you get more attacks out of it. i had it set up so that when you learn lvl 1 then it enables the lvl 2 (which was a new skill but made to look the same) and when you learn that then lvl 3 unlocks and removes the lvl 1 so you only have lvl 2 to use. but then wehn i started my second one, i realized that you can only have 5 skills equiped... so that didnt work anymore :( i dont mind writing extra triggers but i dunno what to put in there so when you get lvl 2 of spell then activate this trigger type thing. aaanyways way to long of a post :P

so yeah, lol if soembody could help me figure out how to do this, that would be great thanks :)

"longs story short, just wanna be able to make custom skills that can level up without JASS(dunno if i can stand to learn a new method :P)"|||you should always start using the "Channel" spell under Neutral Hostile -> Heroes tab. There, as you should know, you can set the number of levels of the spell.

In the trigger section, to set the number of blinks/units attacked, you should make a loop. I'm assuming you are already using a loop for this.

You should then set a variable to "Level of CUSTOMABILITY for TRIGGERINGUNIT x (times) INTEGER" using an "Arithmetic". If you have been using triggers before you should know what I'm talking about here.

The "Level of CUSTOMABILITY for TRIGGERINGUNIT x INTEGER"

takes the level of the ability you based of off "Channel" your hero currently has, and multiplies it by any Integer you want it to. So, for example, if your hero has this spell on level 3 and you set the multiplier Integer to 4, your hero will attack 12 units, but if the spell only is on level 2, 8 units will be attacked.|||Here is the popular Omnislash... You can take triggers if you think the can help you :

Omnislash

Events

Unit - A unit Starts the effect of an ability

Conditions

(Ability being cast) Equal to Omnislash

Actions

Set o = (Triggering unit)

Set t = (Target unit of ability being cast)

Set tl = (Position of t)

If ((Level of Omnislash for o) Equal to 1) then do (Set loops = 2) else do (Do nothing)

If ((Level of Omnislash for o) Equal to 2) then do (Set loops = 4) else do (Do nothing)

If ((Level of Omnislash for o) Equal to 3) then do (Set loops = 7) else do (Do nothing)

Unit - Make o Invulnerable

Animation - Change o's vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency

Selection - Remove o from selection

Unit - Move o instantly to tl

Custom script: call RemoveLocation(udg_tl)

Animation - Play o's attack animation

Unit - Cause o to damage t, dealing (Random real number between 150.00 and 250.00) damage of attack type Hero and damage type Normal

Special Effect - Create a special effect attached to the chest of o using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl

Special Effect - Destroy (Last created special effect)

For each (Integer A) from 1 to loops, do (Actions)

Loop - Actions

Wait 0.30 game-time seconds

Set o_current_loc = (Position of o)

Set EG[1] = (Units within 600.00 of o_current_loc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of o)) Equal to True) and ((((Matching unit) is A flying

Set EG[2] = (Random 1 units from EG[1])

Custom script: call RemoveLocation(udg_o_current_loc)

If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions

(Number of units in EG[1]) Greater than 0

Then - Actions

Unit Group - Pick every unit in EG[2] and do (Actions)

Loop - Actions

Set p = (Picked unit)

Set pl = (Position of p)

Selection - Remove o from selection

Unit - Move o instantly to pl

Custom script: call RemoveLocation(udg_pl)

Animation - Play o's attack animation

Unit - Cause o to damage p, dealing (Random real number between 150.00 and 250.00) damage of attack type Hero and damage type Normal

Special Effect - Create a special effect attached to the chest of o using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl

Special Effect - Destroy (Last created special effect)

Custom script: call DestroyGroup(udg_EG[1])

Custom script: call DestroyGroup(udg_EG[2])

Else - Actions

Custom script: call DestroyGroup(udg_EG[1])

Custom script: call DestroyGroup(udg_EG[2])

Selection - Add o to selection for (Owner of o)

Animation - Change o's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency

Unit - Make o Vulnerable

Selection - Add o to selection for (Owner of o)

Animation - Change o's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency

Unit - Make o Vulnerable

No comments:

Post a Comment