Hopefully the last spell trigger question I have to ask!

Lady MufflaN

New Member
Reaction score
4
Yes, I didn't think it was possible, but it seems like I'm now doing one of the last spells, but I have a problem, I basically want to create a spell that gives more attribute to a hero the more friendly heroes are in range, but I have no idea what conditions I can use for this, I'm totally lost, I was going to use something like
Code:
Alone is Weak
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to The Final Bond 
        (Level of The Final Bond  for (Triggering unit)) Equal to 1
    Actions
        Set DavidFinalBond = (Position of (Triggering unit))
        Set UnitsWithinDFB = (Number of units in (Units within 400.00 of DavidFinalBond))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
            Then - Actions
            Else - Actions

But I have no idea where to go from now, if only I could get a way of checking if allied hero units are in range I should be fine, adding attributes ain't hard, also a implementation that removes the bonus attributes if they aren't in range is essential.
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
you have to make a periodic trigger that counts units in a the unit group (units within 400 of position of (caster) matching owner of matching unit is an ally of caster equal to true and matching unit is a hero equal to true) and then set the level of your ability to that number
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
It would have to be a periodic trigger and a skill learned trigger.

Code:
Unit learns skill
Learned skill = Final Bond
Add Learning Hero to BondedGroup

Code:
Every 0.01 to 1 second (depends on what you want)
Pick all Units in BondedGroup
      Set Point = Position of Picked Unit
      Set UnitGroup1 = Units in a (your range) of point matching (your conditions)

That'd be how you do it...still trying to figure out the bonus skill points part...If you use a skill as drunkengod said, just set its level to the number of units in the group.
 

Lady MufflaN

New Member
Reaction score
4
Code:
Unit learns skill
Learned skill = Final Bond
Add Learning Hero to BondedGroup

BondedGroup is what kind of variable? Unit Group? Because I dunno what to set the variable to, Units in range?
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
Yes its a unit group, it has Group in its name....

Units in range is a unit group selection you can do.
 

Lady MufflaN

New Member
Reaction score
4
Yes its a unit group, it has Group in its name....

Units in range is a unit group selection you can do.

I assume it is something like this you meant?

Code:
Alone is Weak Group
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in DavidFinalBondGroup and do (Actions)
            Loop - Actions
                Set DavidFinalBond = (Position of (Picked unit))
                Set DavidFinalBondGroupFriendly = (Units within 600.00 of DavidFinalBond matching ((((Triggering unit) belongs to an ally of (Owner of David 0103 <gen>)) Equal to True) and (((Picked unit) is A Hero) Equal to True)))

That should only pick friendly heroes right?
 

Knight7770

Hippopotomonstrosesquiped aliophobia
Reaction score
187
Don't forget to remove the leaks!
Yes its a unit group, it has Group in its name....
It could be a player group (or force).
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Not if you're creating the unit group in the periodic trigger. Since you recreate it every second the unit group will always be there when the trigger fires.
 

Lady MufflaN

New Member
Reaction score
4
Right, so it's the attribute part left then, would I be totally wrong if I thought along the ways of converting real to integer and then use "for each integer.."? Anyone got a idea? (This last spell is without a doubt, the hardest one I've tried to get working...)
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
You'll have to use the "call DestroyGroup (udg_Variable)" inside the trigger when creating a new unit group each time it fires though, same with the point.

Edit: Make a spell based on item stat bonus, give it 6 levels (First level gives 0 bonuses). Then use the "Count unit's in unit group" function and do something like this:

Events:
A unit learns a skill

Conditions:
Learned hero skill Equal to Final Bond

Actions:
Add Final Bonds Stat to (triggering unit)
Set FinalBondUnit = triggering unit
----------------

Events:
Every 1 seconds

Conditions:

Actions:
Temp_Loc = Position of FinalBondUnit
Temp_Group = Unit's withing X of Temp_Loc matching (matching unit) belongs to an ally of (owner of FinalBondUnit) equal to true and (matching unit) is a Hero equal to true
Set level of Final Bonds Stat to (Units in Temp_Group - 1)
call RemoveLocation (udg_Temp_Loc)
call DestroyGroup (udg_Temp_Group)
 

Lady MufflaN

New Member
Reaction score
4
You'll have to use the "call DestroyGroup (udg_Variable)" inside the trigger when creating a new unit group each time it fires though, same with the point.

Of course, this is how it looks at the moment
Code:
Alone is Weak Group
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in DavidFinalBondGroup and do (Actions)
            Loop - Actions
                Set DavidFinalBond = (Position of (Picked unit))
                Set DavidFinalBondGroupFriendly = (Units within 600.00 of DavidFinalBond matching ((((Triggering unit) belongs to an ally of (Owner of David 0103 <gen>)) Equal to True) and (((Picked unit) is A Hero) Equal to True)))
                Set UnitsWithinDFB = (Integer((Real((Number of units in DavidFinalBondGroupFriendly)))))
        Custom script:   call RemoveLocation (udg_DavidFinalBond)
        Custom script:   call DestroyGroup (udg_DavidFinalBondGroupFriendly)
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
Remove the call DestroyGroup(udg_DavidFinalBond)
and move the Call DestroyGroup(udg_DavidFinalBondGroupFriendly) into the Select all units in Unit group.
 

Lady MufflaN

New Member
Reaction score
4
Editted my previous post, try something like that.

Like this?

Code:
Alone is Weak Group Copy
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set DavidFinalBond = (Position of (Picked unit))
        Set DavidFinalBondGroupFriendly = (Units within 400.00 of DavidFinalBond matching ((((Triggering unit) belongs to an ally of (Owner of David 0103 <gen>)) Equal to True) and (((Picked unit) is A Hero) Equal to True)))
        Unit - Set level of Ensam är svag ability bonus (+5 All Stats) for (Triggering unit) to (UnitsWithinDFB - 1)
        Custom script:   call RemoveLocation (udg_DavidFinalBond)
        Custom script:   call DestroyGroup (udg_DavidFinalBondGroupFriendly)

EDIT: That one won't work, not like I declared UnitsWithinDFB somehwere, retryin'
 

Lady MufflaN

New Member
Reaction score
4
Trigger #1

Code:
Alone is Weak Copy
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to The Final Bond 
    Actions
        Unit - Add Ensam är svag ability bonus (+5 All Stats) to (Triggering unit)
        Set David = (Triggering unit)


Trigger #2
Code:
Alone is Weak Group Copy
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set DavidFinalBond = (Position of David)
        Set DavidFinalBondGroupFriendly = (Units within 400.00 of DavidFinalBond matching ((((Triggering unit) belongs to an ally of (Owner of David)) Equal to True) and (((Picked unit) is A Hero) Equal to True)))
        Unit - Set level of Ensam är svag ability bonus (+5 All Stats) for David to ((Number of units in DavidFinalBondGroupFriendly) - 1)
        Custom script:   call RemoveLocation (udg_DavidFinalBond)
        Custom script:   call DestroyGroup (udg_DavidFinalBondGroupFriendly)

Somehow it ain't working and I can't see what is wrong :banghead:
 

Lady MufflaN

New Member
Reaction score
4
Updated second trigger, should be closer to good, but it still ain't working.

Code:
Alone is Weak Group Copy
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set DavidFinalBond = (Position of David)
        Set DavidFinalBondGroupFriendly = (Units within 400.00 of DavidFinalBond matching ((((Matching unit) belongs to an ally of (Owner of David)) Equal to True) and (((Matching unit) is A Hero) Equal to True)))
        Unit - Set level of Ensam är svag ability bonus (+5 All Stats) for David to ((Number of units in DavidFinalBondGroupFriendly) - 1)
        Custom script:   call RemoveLocation (udg_DavidFinalBond)
        Custom script:   call DestroyGroup (udg_DavidFinalBondGroupFriendly)
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
I have no idea why that ain't working, try making the item ability unit or hero by changing the booleans in object editor. Also it shouldn't be set to Number of units -1, it should be: set Level of Ensam Är Svag to (number of units in Temp_Group), I screwed the math up a little.
 

vypur85

Hibernate
Reaction score
803
What about something like this:

Code:
Melee Initialization
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set TempGroup = (Units in (Playable map area))
        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) has buff Brilliance Aura) Equal to True
                        (Level of Attribute Bonus for (Picked unit)) Equal to 0
                    Then - Actions
                        Unit - Add Attribute Bonus to (Picked unit)
                    Else - Actions
                        Unit - Remove Attribute Bonus from (Picked unit)

Base the ability off Brilliance Aura. It's not tested though. It's easier this I think. (It'll be a different story when it comes to detect the level of spell, you'd need integer and several buff variables, but try this first),
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 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 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