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.
 
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
 
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.
 
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?
 
Yes its a unit group, it has Group in its name....

Units in range is a unit group selection you can do.
 
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?
 
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).
 
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.
 
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...)
 
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)
 
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)
 
Remove the call DestroyGroup(udg_DavidFinalBond)
and move the Call DestroyGroup(udg_DavidFinalBondGroupFriendly) into the Select all units in Unit group.
 
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'
 
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:
 
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)
 
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.
 
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.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      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