Spells - Making a Chain spell (GUI Version)

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Is this just me or does the chain in the demo map always target 2 units and deals 50 damage? Also it laggs the first time without a preloader.:p (Yeah, like Daelin said, it would be better to do this whole thing in jass)

Made a debug mode to test it out, type reset to set life and mana of all units to 100%.
 
S

somael

Guest
You didn't introduce the smax, temppoint or tempgroup variables at all.. it was very confusing(and it still is) :S
 

Daelin

Kelani Mage
Reaction score
172
somael said:
You didn't introduce the smax, temppoint or tempgroup variables at all.. it was very confusing(and it still is) :S

Daelin said:
In order to understand this tutorial you need basic knowledge about Gui/manipulating the trigger editor.

I think that includes variable initialization too. Go to the variable editor and add them from there.

~Daelin
 

H34DhUnT3r

Ultra Cool Member
Reaction score
36
Mana Healing Wave

Hi,

Can anyone help me? :confused:
I've tried to create a mana healing wave using your chain spell trigger
But it doesn't work:banghead:

Code:
HealingWaveMana
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Mana Healing Wave 
    Actions
        Set MHW_prev = (Triggering unit)
        Set MHW_target = (Target unit of ability being cast)
        Set MHW_level = (Level of (Ability being cast) for MHW_prev)
        Set MHW_targetsnum = (4 + (2 x (MHW_level - 1)))
        For each (Integer A) from 1 to MHW_targetsnum, do (Actions)
            Loop - Actions
                Unit Group - Add MHW_target to MHW_alltargs
                -------- Effect Part --------
                Set MHW_temppoint = (Position of MHW_prev)
                Unit - Create 1 Albatross for (Owner of MHW_prev) at MHW_temppoint facing Default building facing degrees
                Custom script:   call RemoveLocation(udg_MHW_temppoint)
                Animation - Change (Triggering unit) flying height to 50.00 at 0.00
                Unit - Hide (Last created unit)
                Unit - Add Mana Healing Wave (EFFECT) to (Last created unit)
                Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike MHW_target
                Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
                -------- Waiting part --------
                Wait until ((MHW_target has buff Mana Healing Wave ) Equal to True), checking every 0.35 seconds
                -------- Spell part --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (MHW_target is dead) Equal to False
                    Then - Actions
                        Set MHW_temppoint = (Position of MHW_target)
                        Unit - Create 1 Albatross for (Owner of (Triggering unit)) at MHW_temppoint facing Default building facing degrees
                        Custom script:   call RemoveLocation(udg_MHW_temppoint)
                        Unit - Hide (Last created unit)
                        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                        Unit - Add Healing Wave Mana (4 Chain Spell) to (Last created unit)
                        Unit - Set level of Mana Burn (4 Chain Spell) for (Last created unit) to ((8 x (MHW_level - 1)) + MB_cur)
                        Unit - Order (Last created unit) to Night Elf Druid Of The Claw - Rejuvenation MHW_target
                    Else - Actions
                        Set MHW_cur = (MHW_targetsnum + 1)
                -------- Choice Part --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        MHW_cur Less than MHW_targetsnum
                    Then - Actions
                        Set MHW_prev = MHW_target
                        Set MHW_SMax = -1.00
                        Set MHW_temppoint = (Position of MHW_prev)
                        Unit Group - Pick every unit in (Units within 500.00 of (Position of MHW_prev)) and do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        ((Picked unit) is A structure) Equal to False
                                        ((Picked unit) is Mechanical) Equal to False
                                        ((Picked unit) is Magic Immune) Equal to False
                                        ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to False
                                        ((Picked unit) is dead) Equal to False
                                        ((Picked unit) is in MB_alltargs) Equal to False
                                        (Mana of (Picked unit)) Less than (Max mana of (Picked unit))
                                        MB_SMax Greater than (Mana of (Picked unit))
                                    Then - Actions
                                        Set MHW_target = (Picked unit)
                                        Set MHW_SMax = (Mana of (Picked unit))
                                    Else - Actions
                    Else - Actions
                Custom script:   call RemoveLocation(udg_MHW_temppoint)
        Unit Group - Remove all units from MHW_alltargs

If someone finds the problem please reply

Thank you in forward

Greetings H34DhUnT3r[NL]

H34DhUnt3r Custom War3 FT Maps
 

hoeyad

New Member
Reaction score
3
When I put a wait inside the For Each Integer A from 1 to X... loop, everything after the first loop just stops working - nothing happens. Without the wait, it works (obviously everything happens instantly), but with the wait, only the first target is affected and then nothing happens.

I am using a wait 1 second rather than wait for condition, is that the problem?
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
waits do work in loops
but not in pick every unit or player group loops
 

vypur85

Hibernate
Reaction score
803
To make things clear, loops work fine in any Integer Loop (A or B). However, Integer A and B loops usually get interrupted or overwritten in another trigger. So to prevent this, a Custom Variable Integer Loop is used instead (which is also used in this tutorial).

So, change this:
For Each Integer A from 1 to X... loop

into this:
Code:
For Each Custom Integer Variable from 1 to X do
 

Charapanga

New Member
Reaction score
46
I've tried it, i did it exactly like the tutorial, and yet it does not work...

here's what i got...
JASS:
ChainManaBurn
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to ChainManaBurn 
    Actions
        Set prev = (Triggering unit)
        Set Targ = (Target unit of ability being cast)
        Set Level = (Level of ChainManaBurn  for prev)
        Set targetsnum = (4 + (2 x (Level - 1)))
        For each (Integer Cur) from 1 to targetsnum, do (Actions)
            Loop - Actions
                Unit Group - Add Targ to Alltargs
                Set TempPoint = (Position of prev)
                Unit - Create 1 DummyCMB for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
                Custom script:   call RemoveLocation(udg_TempPoint)
                Unit - Hide (Last created unit)
                Animation - Change (Last created unit) flying height to 50.00 at 0.00
                Unit - Add Buff Dummy  to (Last created unit)
                Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike Targ
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Wait until ((((Triggering unit) has buff Mana Burn ) Equal to True) or (((Triggering unit) is dead) Equal to True)), checking every 0.10 seconds
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Targ is dead) Equal to False
                    Then - Actions
                        Set TempPoint = (Position of Targ)
                        Unit - Create 1 DummyCMB for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
                        Custom script:   call RemoveLocation(udg_TempPoint)
                        Unit - Hide (Last created unit)
                        Animation - Change (Last created unit) flying height to 100.00 at 0.00
                        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                        Unit - Add Chain Mana Burn Dummy  to (Last created unit)
                        Unit - Order (Last created unit) to Night Elf Demon Hunter - Mana Burn Targ
                    Else - Actions
                        Set Cur = (targetsnum + 1)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Cur Less than targetsnum
                    Then - Actions
                        Set prev = Targ
                        Set SMax = -1.00
                        Set TempPoint = (Position of prev)
                        Set TempGroup = (Units within 600.00 of TempPoint)
                        Unit Group - Pick every unit in TempGroup and do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        ((Picked unit) is A structure) Equal to False
                                        ((Picked unit) is Mechanical) Equal to False
                                        ((Triggering unit) is Magic Immune) Equal to False
                                        ((Picked unit) belongs to an enemy of (Owner of prev)) Equal to True
                                        ((Picked unit) is dead) Equal to False
                                        ((Picked unit) is in Alltargs) Equal to False
                                        (Max mana of (Picked unit)) Greater than 0.00
                                        SMax Less than (Mana of (Picked unit))
                                    Then - Actions
                                        Set Targ = (Picked unit)
                                        Set SMax = (Mana of (Picked unit))
                                    Else - Actions
                    Else - Actions
                Custom script:   call RemoveLocation(udg_TempPoint)
                Custom script:   call DestroyGroup(udg_TempGroup)
        Unit Group - Remove all units from Alltargs


EDIT: Nevermind, found it, i made the most noob mistake ever...

JASS:
Wait until ((((Triggering unit) has buff Mana Burn ) Equal to True) or (((Triggering unit) is dead) Equal to True)), checking every 0.10 seconds


And replaced with

JASS:
Wait until (((Targ has buff Mana Burn ) Equal to True) or ((Targ is dead) Equal to True)), checking every 0.10 seconds


EDIT2: Now it wont bounce...
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • 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 Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top