HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A Few Spells I Need To Make! Help Appriciated Very Much!

07-16-2005, 02:30 AM#1
xXx-Tricky-xXx
Im new to triggering so I was wondering how I could do a few of these spells or start me off, if someone would have the time to sit and work with me on it id try real hard to get this and learn how to do it, im eager to get good at this map editing stuff, im pretty much always on trying to do this stuff but get no where in the process.
.................................................................................................... ............................

Minion Control
------------------
One is I have these minions that my hero casts. I want to create an ability called Engage which in that case all the minions will attack everything in a certain raidus of the hero and disengage the minions will run back to the hero and protect him. But, the hero can not move the skeletons around himself thats what the engage and disengage is for but he can give them items and enemys can attack the skeletons ofcourse.

Life Steal Heal
------------------
Phew.. ok for the next one im trying to make a healing spell that when clicked you target a minion and your hero shooted out a chain of healing that steals a certain ammount of hp per unit that bounces like 9 times or so in a certain radius, 1 bounce per unit and comes back and heals your targeted minion for the ammount of dmg dealt total on the 9 bounces or maybe less bounces if there wasnt enuff targets in site.

Ambush
----------
ok, for this last one Im just trying to make a spell where when stealthed you attack a unit from behind and it does dmg depending on the lvl of the ability and the more dmg is done by what angle your at. Like if your at a 0 degree angle or something (perfectly behind him) it does full dmg and decreases by the more precent your off but not alot of dmg. And depending on the lvl of the ability theres a chance you can do a backstab and become stealthed again.


Well theres a few more but this might be even too much to ask >.<
:P But i really want to do this and im really working hard to get it but dont know where to even start.

Thanks in advance..... i hope :D
07-16-2005, 03:17 AM#2
Guest
Ambush- Explain what stealthed means.
07-16-2005, 03:30 AM#3
xXx-Tricky-xXx
well im using windwalk and want to use ambush while stealthed, but not the backstab thing from windwalk.
07-16-2005, 06:57 AM#4
TaintedReality
Eh..I've gotta get some sleep but if you still need help tommorow I can help you with the ambush thing(I think). And maybe with the life steal one too, but I'm really tired right now so I can't really think =P.
07-16-2005, 09:10 AM#5
Anitarf
Please state the level of multi instaceability you desire. For a beginner, it usually makes a big difference if he wants the spell to be castable by any ammount of units or just by a single preplaced hero. Having one hero per player is somewhere in between.

Anyway, most of these abilities require heavy triggering, the backstab thing would either require a bonus mod or an ugly solution with a critical strike with lots of levels, The life steal heal would probably need to be entirely triggered or you would use chain lightning but then it would be difficult to determine the number of units affected, the minion control is an entirely triggered system as well.

I'm not saying it's impossible, but perhaps, for training, you should start with something simpler. If you wish to go ahead with this anyway, then just say so and we'll help as best as we can.
07-16-2005, 11:59 AM#6
vile
here's the backstab one, it will deal extra damage and put a blood effect when attacking a unit from behind

Code:
Sneak Attacks
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacking unit) is in (Units within 120.00 of ((Position of (Attacked unit)) offset by -150.00 towards (Facing of (Attacked unit)) degrees))) Equal to True
        ((Attacked unit) is A structure) Equal to False
        ((Attacked unit) is Mechanical) Equal to False
        (Level of Sneak Attacks  for (Attacking unit)) Greater than or equal to 1
    Actions
        Wait 0.03 seconds
        Trigger - Turn off (This trigger)
        Unit - Order (Attacking unit) to damage (Attacked unit) for (30.00 x (Real((Level of Sneak Attacks  for (Attacking unit))))) using attack type Hero and damage type Normal.
        Floating Text - Create floating text that reads Back Stabbed!   above (Attacked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 15.00%, 15.00%), and 0.00% transparency
        Special Effect - Create a special effect attached to the origin of (Attacked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
        Special Effect - Destroy (Last created Special Effect)
        Floating Text - Destroy (Last created floating text)
        Wait 0.40 seconds
        Trigger - Turn on (This trigger)
07-16-2005, 05:20 PM#7
TaintedReality
Only problem with that is the Unit is Attacked trigger just goes off when the unit starts attacking, or maybe when he is ordered to attack, I'm not completely sure. But anyways, he can just right click on them then press stop really fast and do about 20 sneak attacks a second. So you should probably use the Unit Takes Damage Event. This is also better because then you could get a percentage of the original attack damage(so you could do things like 200% damage if your behind them, 150% if your beside them, and normal damage if your in front.)
07-16-2005, 06:53 PM#8
vile
only a seriously brain injured idiot would try to attack a unit 20 times just to "see" if the spell can be abused, so i doubt that would be needed.
and anyways, you cant use a unit takes damage event, because in that line, you have to choose the unit who takes damage, you cant set it with variables, or u cant even put a general "a unit takes damage" you have to define what unit takes damage. i think there's a jass out there that detects this but i wouldnt go through all this just to make sure someone wont right click 20 times!@#
07-16-2005, 07:13 PM#9
xXx-Tricky-xXx
hm.. thanks for the posts...
maybe i can try something similar to that vile :D and experiment but anitarf i dont quite understand what you mean about
Quote:
Please state the level of multi instaceability you desire. For a beginner, it usually makes a big difference if he wants the spell to be castable by any ammount of units or just by a single preplaced hero. Having one hero per player is somewhere in between.

I just want one hero and spawns like dota or ne other of that kind.

Quote:
I'm not saying it's impossible, but perhaps, for training, you should start with something simpler. If you wish to go ahead with this anyway, then just say so and we'll help as best as we can.

Well, theres not really anything simpler i would want to make instead but practice would help, but i cant go off of a tutorial or reading a triggers for dummies or anything that much cause that stuff required ALOT of memorizing and when i read something i kinda forget what i just read. :P

As for the Life Steal Heal the only way I could think of is there is 2 chain heal spells from the orc hero that has chain heal i set to -25. The hero has one but it doesnt bounce at all and you can only cast on your skeleton minions and they have a hidden ability the 2nd chain heal that bounces so many times in the area and a trigger that has the targeted skeleton from the heros spell cast his on a nearby enemy target and it dmgs that enemy for 25dmg and bounces to all other enemy targets if there is any and all dmg done is added up and heals the skeleton.... actually that might even be harder i dont know a simpler way i dont even know how to do it.

for the ambush so theres no way to like make a few conditions and effect sets when triggering unit casts spell on targeting unit, triggering unit is at an angle and depending on the angle it does a ammount of damage. ange=offset? or something?

the skeleton thing... wouldnt you just have 2 normal abilities and the engage would be like unit grp of type of unit attack all enemy in a radius or something and disengage, all unit grp of type unit follow hero. But is there a trigger that if you double click an ability you can make an action so u can command your skeleton what to attack. But same as before you can not move them but can select.
07-16-2005, 07:16 PM#10
xXx-Tricky-xXx
ah sorry guys i dont want to waste your time

im just going to forget about this, i had high hopes and was really getting into this wanting to do it but its just not going to happen, i dont think im going to be able to learn triggering like you guys and know everything, id be willing to learn and practice but i only have so long until school starts again and it just wouldnt me enough time.
07-16-2005, 07:40 PM#11
TaintedReality
Well, it's not really that important, because like you said someone probly isnt gonna hit stop 20 times to see if its bugged, but the less exploits there are the better ; ). And all you need to do to use that event is make a trigger something like this.

Code:
Spec Unit Events
    Events
        Unit - A unit enters (Entire map)
    Conditions
    Actions
        Trigger - Add to Trigger <gen> the event (Unit - (Triggering unit) Takes damage)

Of course, then you would have to put all your units in with triggers instead of in the WE, but I find that's better to do anyways.
07-16-2005, 07:54 PM#12
xXx-Tricky-xXx
just wondering....
how did you guys learn all this stuff
07-16-2005, 08:58 PM#13
Anitarf
Experimenting. Logical thinking. Some (very very basic) programming knowledge. Reading a lot of threads on this forum, seeing practical problems other people had and solutions to them... I've been around for, what, year and a half now, and still learning. Only started using JASS two months ago. Mostly, I was able to figure out stuff by myself, things generally make sense, but I suppose if logic and math give you trouble it may not always be that easy.

What I meant with multi instanceability was, how many units in a map can have a triggered ability? This is usually a big issue for a rookie GUI user. making it work for just one (preplaced) unit is easy, you can make all triggers reference it directly, no trouble there, but it's more difficult to grasp the concept of general solutions, when more units can be casting the same spell at the same time, and the triggers mustn't get entwined with one another. With local variables, that's easy, as whenever a trigger runs, it creates it's own personal database which noone else can use, but making this in GUI where you only have globals requires some intelligent array management... it's not impossible, just difficult.

If only a single player can choose a hero of this type and then others aren't allowed to in your map, then you have a slightly easier job ahead of you. Stlll, making complicated triggered abilities unlike any of those warcraft has so far is not an easy thing to start with. It's not impossible, just not easy. I'm sure you can (with some help) make any of those abilities, I don't mean to discourage you, it's just that asking for three of them in a single thread had me worried a bit that maybe you are expecting things to be easier than they are.

The goal of what I wrote is not to discourage you from mapmaking, on the contrary, I wish to encourage you, and that's why I'm expressing concern, as there is nothing more discouraging than going into a project that is frustratingly incomprehensive. A challenge is entertaining so long as you are solving it, not if you are staring at it with no idea how to do it. If I tried to do any of the maps I am making now one and a half years ago, I would have given up on mapmaking too.


Edit: Well, ambush is not such a big deal. You need a trigger that runs when a unit starts the effect of an ability, checks if the ability being cast is ambush, and after that you need some angle comparisons. I just have a JASS function handy from one of my current projects, I hope you won't be too intimidated by seeing JASS code, it really is nothing to be afraid of, and this function just does nearly exactly what you want, so I'll post it:
Code:
function FlankFactor takes unit att, unit def returns real
    local real array r
    set r[1] = GetUnitX( att )
    set r[2] = GetUnitY( att )
    set r[3] = GetUnitX( def )
    set r[4] = GetUnitY( def )
    set r[5] = Atan2BJ( ( r[4] - r[2] ), ( r[3] - r[1] ) )
    set r[6] = GetUnitFacing( def )
    
    if r[5] < 0.0 then
        set r[5] = r[5] + 360.0
    endif
    set r[7] = r[6] - r [5]
    if RAbsBJ( r[7] ) > 180 then
        set r[7] = r[7] - (360 * RSignBJ( r[7] ))
    endif
    
    return ( 180 - RAbsBJ(r[7]) )
endfunction
Originaly, this function gave me a flank factor in my map, which was 2 for back attacks, 1.5 for flank attacks and 1 for front attacks, but that doesn't matter, I modified it to suit what you want, it now gives a number between 0 and 180, 0 being completely frontal and 180 direct backstab.

It's really easy to use. You just have to call it with a custom script. Let's say you're doing this in a trigger that runs on a spell cast event, you have the casting unit and the target unit of ability being cast, in JASS they are GetTriggerUnit() and GetSpellTargetUnit(). All you need is a real variable, let's name it tempReal, and the given JASS function copied to your map header, and you're set to go, just use the following code in a custom script and your real variable will hold that number from 0 to 180:

Code:
set udg_tempReal = FlankFactor( GetTriggerUnit(), GetSpellTargetUnit() )
Now, all you need to do with that number is use it in your damage equation along with some other factors (like the level of ambush for the casting unit) and then deal that damage with the "unit - damage target" action.
07-16-2005, 10:34 PM#14
xXx-Tricky-xXx
>.< man, you can pretty much do anything, are there like tutorials or things that like give u a project and take u through it or something or something to get me good at triggers and understanding stuff. cuz i know right now i cant do anything but the thing is i like wc3 but i suck at EVERYTHING and i have more fun messing around in map editor then actually playing the game unless its stuff i made in editor. like i didnt even understand one word u said about the jass backstab thing and how to use it so it works.

oh and for the tempreal variable thing..... i dont get it, i used it in another trigger, didnt know what it is maybe thats something that might be messing up my other 2 spells which ive sort of gotten to understand except they wont work!

This was the sinister strike and u get combo point for every time its casted.

Code:
Rogue Sinister Strike
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Sinister Strike (Triggers)
    Actions
        Set Stored_Unit[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
        Sound - Play RogueSinisterStrikeImpact <gen> at 100.00% volume, located at (Position of (Triggering unit)) with Z offset 0.00
        Unit - Order (Triggering unit) to damage (Target unit of ability being cast) for (Real(((Agility of (Triggering unit) (Include bonuses)) x 1))) using attack type Hero and damage type Normal.
        Unit - Order (Triggering unit) to damage (Target unit of ability being cast) for (Real((10 x (Level of (Ability being cast) for (Triggering unit))))) using attack type Hero and damage type Normal.
        Unit - Order gg_unit_htow_0042 to Undead Necromancer - Cripple (Target unit of ability being cast)
        Unit Group - Add (Target unit of ability being cast) to ComboUnits
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Sphere (Vengeance - Level 5) for (Target unit of ability being cast)) Equal to 1
            Then - Actions
                Skip remaining actions
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Sphere (Vengeance - Level 4) for (Target unit of ability being cast)) Equal to 1
            Then - Actions
                Floating Text - Create floating text that reads 5 Points! above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Unit - Remove Sphere (Vengeance - Level 4) from (Target unit of ability being cast)
                Unit - Add Sphere (Vengeance - Level 5) to (Target unit of ability being cast)
                Skip remaining actions
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Sphere (Vengeance - Level 3) for (Target unit of ability being cast)) Equal to 1
            Then - Actions
                Floating Text - Create floating text that reads 4 Points above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Unit - Remove Sphere (Vengeance - Level 3) from (Target unit of ability being cast)
                Unit - Add Sphere (Vengeance - Level 4) to (Target unit of ability being cast)
                Skip remaining actions
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Sphere (Vengeance - Level 2) for (Target unit of ability being cast)) Equal to 1
            Then - Actions
                Floating Text - Create floating text that reads 3 Points above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Unit - Remove Sphere (Vengeance - Level 2) from (Target unit of ability being cast)
                Unit - Add Sphere (Vengeance - Level 3) to (Target unit of ability being cast)
                Skip remaining actions
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Sphere (Vengeance - Level 1) for (Target unit of ability being cast)) Equal to 1
            Then - Actions
                Floating Text - Create floating text that reads 2 Points! above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Unit - Remove Sphere (Vengeance - Level 1) from (Target unit of ability being cast)
                Unit - Add Sphere (Vengeance - Level 2) to (Target unit of ability being cast)
                Skip remaining actions
            Else - Actions
        Floating Text - Create floating text that reads 1 Point above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Unit - Add Sphere (Vengeance - Level 1) to (Target unit of ability being cast)
        Unit - Order Player_Unit_Heroes[(Player number of (Owner of (Triggering unit)))] to Attack Stored_Unit[(Player number of (Owner of (Triggering unit)))]


This is what you spend your combo points on:

Code:
Rogue Evisercate
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Eviscerate (Triggers)
    Actions
        Set TempReal = 0.00
        Set Stored_Unit[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
        Sound - Play RogueEviscerateTarget <gen> at 100.00% volume, located at (Position of (Triggering unit)) with Z offset 0.00
        Unit - Order (Triggering unit) to damage (Target unit of ability being cast) for ((Real((Level of (Ability being cast) for (Triggering unit)))) x 75.00) using attack type Hero and damage type Normal.
        Unit - Order (Triggering unit) to damage (Target unit of ability being cast) for (Real(((Agility of (Triggering unit) (Include bonuses)) x 2))) using attack type Hero and damage type Normal.
        Set TempReal = (TempReal + 0.00)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Sphere (Vengeance - Level 5) for (Target unit of ability being cast)) Equal to 1
            Then - Actions
                Set TempReal = (TempReal + 100.00)
                Unit - Order (Triggering unit) to damage (Target unit of ability being cast) for ((Real((Level of (Ability being cast) for (Triggering unit)))) x 2000.00) using attack type Hero and damage type Normal.
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Sphere (Vengeance - Level 4) for (Target unit of ability being cast)) Equal to 1
            Then - Actions
                Set TempReal = (TempReal + 100.00)
                Unit - Order (Triggering unit) to damage (Target unit of ability being cast) for ((Real((Level of (Ability being cast) for (Triggering unit)))) x 175.00) using attack type Hero and damage type Normal.
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Sphere (Vengeance - Level 3) for (Target unit of ability being cast)) Equal to 1
            Then - Actions
                Set TempReal = (TempReal + 375.00)
                Unit - Order (Triggering unit) to damage (Target unit of ability being cast) for ((Real((Level of (Ability being cast) for (Triggering unit)))) x 150.00) using attack type Hero and damage type Normal.
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Sphere (Vengeance - Level 2) for (Target unit of ability being cast)) Equal to 1
            Then - Actions
                Set TempReal = (TempReal + 225.00)
                Unit - Order (Triggering unit) to damage (Target unit of ability being cast) for ((Real((Level of (Ability being cast) for (Triggering unit)))) x 125.00) using attack type Hero and damage type Normal.
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Sphere (Vengeance - Level 1) for (Target unit of ability being cast)) Equal to 1
            Then - Actions
                Set TempReal = (TempReal + 100.00)
                Unit - Order (Triggering unit) to damage (Target unit of ability being cast) for ((Real((Level of (Ability being cast) for (Triggering unit)))) x 100.00) using attack type Hero and damage type Normal.
            Else - Actions
        Unit - Remove Sphere (Vengeance - Level 1) from (Target unit of ability being cast)
        Unit - Remove Sphere (Vengeance - Level 2) from (Target unit of ability being cast)
        Unit - Remove Sphere (Vengeance - Level 3) from (Target unit of ability being cast)
        Unit - Remove Sphere (Vengeance - Level 4) from (Target unit of ability being cast)
        Unit - Remove Sphere (Vengeance - Level 5) from (Target unit of ability being cast)
        Unit - Remove Combo buff from (Target unit of ability being cast)
        Unit - Order Player_Unit_Heroes[(Player number of (Owner of (Triggering unit)))] to Attack Stored_Unit[(Player number of (Owner of (Triggering unit)))]
        Floating Text - Create floating text that reads ((|cffff0000 + (String((Integer(TempReal))))) + !) at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Set TempFloatText = (Last created floating text)
        Trigger - Run Floating Text Fadeout <gen> (ignoring conditions)

but when i eviscrete it does no damage nomatter how many times i cast sinister strike on a unit.
07-16-2005, 11:15 PM#15
Anitarf
Not all people have played WoW (actually, most people who remain here do so specifficaly because they aren't hooked up on wow), so it would help if you gave detailed and precise specifications on how you want these spells to behave to recieve the best assistance possible.

There are a bunch of tutorials, just check the tutorials section.