Need help with Spell-triggers

Bullbaz

New Member
Reaction score
1
Hello, I'm totally new here at TheHelper and I'm new to World Editor too.
I'm however getting the hang of it pretty fast, but that's not what this thread is about.

I'm creating some kind of PvP-based map, it will probably turn out something like DotA, only difference is that mine won't be very good.
However, I want to create a spell that I will probably call Blinkblast or something like that, and what it's suppose to do is blink to the selected location and then create an AoE blast.

I don't know how to do this, but I guess it should be possible to just make a trigger that sais:
"When stop-casting-blink cast this cool AoE thang where the dude is standing Yeah pjew pjew!"

well, something like that.. So that the AoE automatically triggers when the blink is done.

So, is this possible, and if it is, how do I make it work?

And as i said, I'm very new to this, so I understand if you just want to throw me out the window.

EDIT: And just to let you know, I'm running WE clean, No JASS stuff or anything like that and no other "addons".
I like to keep it that way just to see how good looking and hopefully fun a map can be with only the original WE things.
 

inevit4ble

Well-Known Member
Reaction score
38
lol you make WE sound like a drugy :p

I'll post a trigger here in a moment

This is a tested trigger code:

Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to BlinkBlast
Actions
Special Effect - Create a special effect at (Position of (Casting Unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Unit - Order Triggering Unit to damage area in 0.00 seconds of size 500 at (Position of (Triggering Unit)) for 300.00 using attack type Spell and damage type Normal.
 

Exide

I am amazingly focused right now!
Reaction score
448
Does it have to be MUI?

If you base the ability of blink, maybe this will do the trick:

Code:
Untitled Trigger 001
    Events
        Unit - A unit Finishes casting an ability
    Conditions
        (Ability being cast) Equal to Blink
    Actions
        Set loc = (Target point of ability being cast)
        Special Effect - Create a special effect at loc using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Set SpecialFX = (Last created special effect)
        Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 500.00 at loc, dealing 100.00 damage of attack type Spells and damage type Normal
        Custom script:   call RemoveLocation(udg_loc)
        Custom script:   call DestroyEffect( udg_SpecialFX )
-Not tested.
 

Bullbaz

New Member
Reaction score
1
lol you make WE sound like a drugy :p
Mwaha ;P

And Exide, im trying to read through your trigger to make myself understand triggers a bit better, and it seems like it's in order in my tiny head until I get to the "Actions" part, where I don't know how to put it into my trigger editor, and I don't know wtf it means :p so if you have the time, please explain how I insert it into my editor.

(still trying to not be too much of a n00b, but it's hard.)
 

inevit4ble

Well-Known Member
Reaction score
38
You would need to put each command into the trigger editor one at a time.

You can't copy paste
You right click and use the menus to get the right options
 

Bullbaz

New Member
Reaction score
1
Yeah that's what I did with the first two, then when I realized I couldn't find the rest of the cmd's from Action I thought there might be an easier way.
But I'll try this in a while :p

Thanks for the help, I'll come back with an edit when I've tried the spell.
 

Exide

I am amazingly focused right now!
Reaction score
448
My trigger is a bit "advanced" (not really, but you can make it in a simpler way.)
However, the simpler way is faulty, and you should learn how to do it correctly to begin with, so you don't have to re-learn! :p

So, my trigger:

Code:
        Set loc = (Target point of ability being cast)

loc is a Point Variable. I named it loc for 'location'.
>Why do we set a Point Variable?
-Because Points leak memory.
>What is a memory leak?
-It's bad. What it is EXACTLY, I don't know.. (There are pleny of Tutorials about it around here.) Memory leaks cause lag - the more leaks you have, the more lag you will get.
-So we clean up the leak, after we've used the point.

Code:
        Special Effect - Create a special effect at [B]loc[/B] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl

Creates a special effect at earlier mentioned point, named loc.

Code:
        Set SpecialFX = (Last created special effect)

SpecialFX is a Special Effect Variable.
Special effects also leaks.

Code:
        Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 500.00 at loc, dealing 100.00 damage of attack type Spells and damage type Normal

Makes a unit cause damage around loc. (Second time using the same point.)

Code:
        Custom script:   call RemoveLocation([B]udg_loc[/B])

This is JASS. (The programming language that WC3 uses.)
-This will "clean up" the point leak. udg_loc = user defined global - named loc.
user defined = set by a user (You). Global variable means that this variable can be used in several triggers (as opposed to local variables.)

Code:
        Custom script:   call DestroyEffect( udg_SpecialFX )

Same as above, but for the special effect instead. (This can be done in GUI -without JASS- if you prefer, looks like this:)

Code:
Special Effect - Destroy SpecialFX


I bet that didn't make anything more clear than before, but there you have it. :p
 

inevit4ble

Well-Known Member
Reaction score
38
Why make such an advanced trigger for a simply task. I did the same in two actions with no variables and the anti-leak prog doesn;t have any probs with it. Gosh!:nuts:
 

Exide

I am amazingly focused right now!
Reaction score
448
Why make such an advanced trigger for a simply task. I did the same in two actions with no variables and the anti-leak prog doesn;t have any probs with it. Gosh!:nuts:

Because, frankly, your trigger sucks. :rolleyes:
It leaks; several points and a special effect.
 

inevit4ble

Well-Known Member
Reaction score
38
Lol I love you too :p?

But I get by just fine. My younger bro fixes that stuff for me anyway.

He's the JASS Nerd and I jus do the rest :D
 

Romek

Super Moderator
Reaction score
964
It's bad. What it is EXACTLY, I don't know..
Basically, it's a handle which has taken up memory, but then has been lost reference of. Meaning it can't be deleted or anything anymore. So.. It'll just pointlessly take up memory.
 

shinami

Redirect your complaints to the nearest wall
Reaction score
47
I didn't read through the whole thread so i'm not sure if someone pointed this out, but when using "damage area" action, your allies also get damaged, and if i remember correctly you also get damaged.
 

DiFm

New Member
Reaction score
35
Yea thats what i was gonna say you need to add like make unit Invulnerable Or else he will be Damaged also and all of your friends will be, better IF you made a Unitgroup of all enemies in that area then Damaged all units in unitgroup.
 

Bullbaz

New Member
Reaction score
1
I bet that didn't make anything more clear than before, but there you have it. :p

Actually that made me very much pro1337haxx!
No but seriously, I did understand it, and now I've managed to put it all together too. BUT, it doesn't work. I don't know but would the very first line be the thing fekking it up?

Mwehe! I just tried it and it was the very first line.
Because the event said "A unit Finishes casting an ability",
And the condition for the AoE to happen was suppose to be Blink being casted, and the trigger was set into motion when it was finished, so when the trigger actually went into action the ability was done and the conditions didn't match any more.

I might be way wrong, but it works now that I use Unit - A unit begins casting an ability, so I guess... I'm right?
 

Exide

I am amazingly focused right now!
Reaction score
448
Yea, my bad.
I guess you can use:

Code:
Unit - A unit Finishes casting an ability

together with:

Code:
Set loc = Position of (Triggering Unit)

If you wanted to. :p

As long as it works, it's fine. :thup:
 

AoW_Hun7312

I'm a magic man, I've got magic hands.
Reaction score
76
Code:
Trigger
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Animate Dead
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Animate Dead for (Casting unit)) Equal to 1
            Then - Actions
                Set TemPoint = (Target point of ability being cast)
                Unit Group - Pick every unit in (Units within 300.00 of (Target point of ability being cast) matching (((Picked unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
                    Loop - Actions
                        Set SpecialEffectPoint = (Position of (Picked unit))
                        Special Effect - Create a special effect at SpecialEffectPoint using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Cause (Casting unit) to damage (Picked unit), dealing 300.00 damage of attack type Spells and damage type Normal
                        Custom script:   call RemoveLocation (udg_SpecialEffectPointt)
                Set TempGroup = (Last created unit group)
                Custom script:   call DestroyGroup (udg_TempGroup)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Animate Dead for (Casting unit)) Equal to 2
                    Then - Actions
                        Set TemPoint = (Target point of ability being cast)
                        Unit Group - Pick every unit in (Units within 400.00 of (Target point of ability being cast) matching (((Picked unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
                            Loop - Actions
                                Set SpecialEffectPoint = (Position of (Picked unit))
                                Special Effect - Create a special effect at SpecialEffectPoint using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                                Special Effect - Destroy (Last created special effect)
                                Unit - Cause (Casting unit) to damage (Picked unit), dealing 400.00 damage of attack type Spells and damage type Normal
                                Custom script:   call RemoveLocation (udg_SpecialEffectPointt)
                        Set TempGroup = (Last created unit group)
                        Custom script:   call DestroyGroup (udg_TempGroup)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Animate Dead for (Casting unit)) Equal to 3
                            Then - Actions
                                Set TemPoint = (Target point of ability being cast)
                                Unit Group - Pick every unit in (Units within 500.00 of (Target point of ability being cast) matching (((Picked unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
                                    Loop - Actions
                                        Set SpecialEffectPoint = (Position of (Picked unit))
                                        Special Effect - Create a special effect at SpecialEffectPoint using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                                        Special Effect - Destroy (Last created special effect)
                                        Unit - Cause (Casting unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
                                        Custom script:   call RemoveLocation (udg_SpecialEffectPointt)
                                Set TempGroup = (Last created unit group)
                                Custom script:   call DestroyGroup (udg_TempGroup)
                            Else - Actions

This should work. Replace Animate Dead with your spell.
 

Bullbaz

New Member
Reaction score
1
I didn't read through the whole thread so i'm not sure if someone pointed this out, but when using "damage area" action, your allies also get damaged, and if i remember correctly you also get damaged.

That's very very true, I just realized that.
But I actually want to damage nearby allies too, so instead I made the triggering unit invunerable for about 0.50 sec ^^,
(and yes, it works.)
 

shinami

Redirect your complaints to the nearest wall
Reaction score
47
That's very very true, I just realized that.
But I actually want to damage nearby allies too, so instead I made the triggering unit invunerable for about 0.50 sec ^^,
(and yes, it works.)

Either that or your just too lazy to make moar actions that wouldn't damage allies. Well atleast thats what i did when i first experienced this problem. I made an excuse which sounds like " i wantz mah allies to die awswell " :)
 

Bullbaz

New Member
Reaction score
1
Either that or your just too lazy to make moar actions that wouldn't damage allies. Well atleast thats what i did when i first experienced this problem. I made an excuse which sounds like " i wantz mah allies to die awswell " :)

Yeah well, I wanted to make it the don't-dmg-homies way at first :p
But then I realized it's easier AND a bit more believable the easy way, since I make a bigass freakin blastwave that's coming out of my heroes body, if my allies stands next to me when I do that they should feel it, however I shouldn't, since it "comes out" from me :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top