Retry at a "old" spell trigger

Lady MufflaN

New Member
Reaction score
4
Righto, some of you might remember my tries to create a spell that adds stats to units the more units are in range of the unit with the ability, ( http://www.thehelper.net/forums/showthread.php?t=88232&page=2 )

Now thing is, it ain't working and I've decided to retry this spell, because it will actually be quite awesome for my map if I get it to work, and I'm not happy with the spell I made to replace it as it got no real synergy with the rest of the spells the hero got.

So to start of where we left, we had a spell that didn't increase in levels depending on the amount of units in range of it, and I was wondering, can WC3 really convert the amount of units in a unit group to an integer? Because as far as I know scripting, this should work and well, it ain't.

Code:
Alone is Weak
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set David = <insert witty bisexual joke> 0103 <gen>
        Set DavidFinalBondGroupFriendly = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
        Unit Group - Pick every unit in DavidFinalBondGroupFriendly 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
                    Then - Actions
                        Set DavidFinalBondGroup = (Units within 400.00 of (Position of David) matching ((((Matching unit) has buff Brilliance Aura) Equal to True) and (((Matching unit) belongs to an ally of (Owner of David)) Equal to True)))
                        Set UnitsWithinDFB = (Number of units in DavidFinalBondGroup)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit)) Not equal to UnitsWithinDFB
                            Then - Actions
                                Unit - Add Ensam är svag ability bonus (+5 All Stats) to (Picked unit)
                                Unit - Set level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit) to UnitsWithinDFB
                            Else - Actions
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Brilliance Aura) Equal to False
                        (Level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit)) Not equal to 0
                    Then - Actions
                        Unit - Remove Ensam är svag ability bonus (+5 All Stats) from (Picked unit)
                    Else - Actions
 

Exide

I am amazingly focused right now!
Reaction score
448
Try removing this part, and see if it works:

Code:
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Brilliance Aura) Equal to False
                        (Level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit)) Not equal to 0
                    Then - Actions
                        Unit - Remove Ensam är svag ability bonus (+5 All Stats) from (Picked unit)
                    Else - Actions

If not, then it SHOULD be your conditions that are wrong.
 

San-D

New Member
Reaction score
15
Why dont u make it that way- make a max of how much the bonus can be. Say u want to ad 1 to all stats for every unit in range. make the max ... say ... 25. Make ability with 25 levels and make. Every 1 second , count units in range, set Var= units in range, set level of ur ability to Var!
 

Lady MufflaN

New Member
Reaction score
4
Why dont u make it that way- make a max of how much the bonus can be. Say u want to ad 1 to all stats for every unit in range. make the max ... say ... 25. Make ability with 25 levels and make. Every 1 second , count units in range, set Var= units in range, set level of ur ability to Var!

We did that in a earlier test I believe, and the we did have a level of the spell for the maximum amount possible, there are at max 10 allied heroes at one point, the spell have 10 levels, or well, the item ability.
 

Lady MufflaN

New Member
Reaction score
4
Try removing this part, and see if it works:

Code:
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Brilliance Aura) Equal to False
                        (Level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit)) Not equal to 0
                    Then - Actions
                        Unit - Remove Ensam är svag ability bonus (+5 All Stats) from (Picked unit)
                    Else - Actions

If not, then it SHOULD be your conditions that are wrong.

It does not work, it will only give the first level of the ability to the hero even if in this case it had 4 other heroes in range, which should have given it the level 5 bonus.


So, whats the problem with that shorter version of this idea of urs?


If you mean the spell I replaced it with, if we put it like this, it would be like putting Laguna's Blade on Sven in DotA, it's just not fitted for that hero.
 

oorosco

New Member
Reaction score
23
Your trigger is written wrong- the group thing shoudl work but what you got wrong is that you don't remove units from the group properly. You should just do this- add the units to the group, and then also just check the groups to see if each one has the buff if they don't then remove one level not remove the entire ability...
 

Lady MufflaN

New Member
Reaction score
4
Your trigger is written wrong- the group thing shoudl work but what you got wrong is that you don't remove units from the group properly. You should just do this- add the units to the group, and then also just check the groups to see if each one has the buff if they don't then remove one level not remove the entire ability...

Not following, sorry, write it out, perhaps I'm tired or something, but suddenly nothing made sense anymore
 

oorosco

New Member
Reaction score
23
Code:
Untitled Trigger 004
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units within 512.00 of (Position of caster)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is A Hero) Equal to True
                        ((Triggering unit) has buff Acid Bomb) Equal to True
                    Then - Actions
                        Unit - Set level of Acid Bomb for caster to ((Level of Acid Bomb for (Triggering unit)) + 1)
                        Unit - Add Acid Bomb to caster
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Triggering unit) has buff Acid Bomb) Equal to True
                            Then - Actions
                                Unit - Set level of Acid Bomb for caster to ((Level of Acid Bomb for (Triggering unit)) - 1)
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Level of Acid Bomb for caster) Equal to 1
                                    Then - Actions
                                        Unit - Remove Acid Bomb from caster
                                    Else - Actions
                            Else - Actions
 

Lady MufflaN

New Member
Reaction score
4
Thanks, seems like I'm to tired to understand anything so I'll look at it tomorrow, plus rep to all that helped of course
 

Exide

I am amazingly focused right now!
Reaction score
448
Code:
Untitled Trigger 004
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units within 512.00 of (Position of caster)) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is A Hero) Equal to True
                        ((Triggering unit) has buff Acid Bomb) Equal to True
                    Then - Actions
                        Unit - Set level of Acid Bomb for caster to ((Level of Acid Bomb for (Triggering unit)) + 1)
                        Unit - Add Acid Bomb to caster
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Triggering unit) has buff Acid Bomb) Equal to True
                            Then - Actions
                                Unit - Set level of Acid Bomb for caster to ((Level of Acid Bomb for (Triggering unit)) - 1)
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Level of Acid Bomb for caster) Equal to 1
                                    Then - Actions
                                        Unit - Remove Acid Bomb from caster
                                    Else - Actions
                            Else - Actions

There is no (Triggering Unit)..
 

oorosco

New Member
Reaction score
23
Sigh... i showed him the temp, i'm sorry that i missed something while sspeed triggering
 

Lady MufflaN

New Member
Reaction score
4
Hey hey, don't get all heated over this, even I can understand that triggering unit need to be changed to picked unit, now I need to go to bed, badly, or I'll sleep for 14-18 hours tomorrow, something I really would like to avoid.
 

Lady MufflaN

New Member
Reaction score
4
Sadly I can't get it to work it seems :\

But I still wonder why the original won't work, can ANYONE see ANYTHING wrong with it?

Code:
Alone is Weak Group Copy Copy
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set David = <insert witty bisexual joke> 0103 <gen>
        Set DavidFinalBondGroupFriendly = (Units within 500.00 of (Position of David) matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an ally of (Owner of David)) Equal to True)))
        Unit Group - Pick every unit in DavidFinalBondGroupFriendly 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
                    Then - Actions
                        Set DavidFinalBondGroup = (Units within 400.00 of (Position of David) matching ((((Matching unit) has buff Brilliance Aura) Equal to True) and (((Matching unit) belongs to an ally of (Owner of David)) Equal to True)))
                        Set UnitsWithinDFB = (Number of units in DavidFinalBondGroup)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit)) Not equal to UnitsWithinDFB
                            Then - Actions
                                Unit - Add Ensam är svag ability bonus (+5 All Stats) to (Picked unit)
                                Unit - Set level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit) to UnitsWithinDFB
                            Else - Actions
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) has buff Brilliance Aura) Equal to False
                        (Level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit)) Not equal to 0
                    Then - Actions
                        Unit - Remove Ensam är svag ability bonus (+5 All Stats) from (Picked unit)
                    Else - Actions
 

0 flip

New Member
Reaction score
2
hai all

Code:
(Level of Ensam är svag ability bonus (+5 All Stats) for (Picked unit)) Not equal to UnitsWithinDFB

(Level of A) not equal to (Units in DavidFinalBondGroup)

doesnt make any sense
(probably thats ur problem)
 

vypur85

Hibernate
Reaction score
803
Why not adjusting the map I've attached in your previous thread? After that, import the whole thing back to your original map. That map seems to work. It could possibly be other problems besides triggering. Maybe your ability name or buff name are incorrect (or something...) could be the reason.

Edit:
>from what i understand, that condition just raises/lowers the level of an ability, based on how many units of a certain type are nearby, correct?

Correct :)
 

0 flip

New Member
Reaction score
2
its an integer comparison :S how couldnt it make sense?

from what i understand, that condition just raises/lowers the level of an ability, based on how many units of a certain type are nearby, correct?

No it removes the ability if the level is equal to the number of units in the group
WICH MAKES NO SENSE?!
 

Lady MufflaN

New Member
Reaction score
4
Why not adjusting the map I've attached in your previous thread? After that, import the whole thing back to your original map. That map seems to work. It could possibly be other problems besides triggering. Maybe your ability name or buff name are incorrect (or something...) could be the reason.

Edit:
>from what i understand, that condition just raises/lowers the level of an ability, based on how many units of a certain type are nearby, correct?

Correct :)

It's an aura that gives all friendly units in range of it more stats, and the more friendly units in range, the stronger the aura get. It's not called "Alone is weak" for nothing (don't comment on the name, it's there for a reason >>)
 

vypur85

Hibernate
Reaction score
803
>It's an aura that gives all friendly units in range of it more stats, and the more friendly units in range, the stronger the aura get.

Err... Ya? Didn't I attached the demo map? It worked didn't it? Just a little bit different from what you want but just some minor adjustment might just work for you. What I'm saying is that maybe you did not do any mistake in triggering. It could be Object Editor problem. Is the buff the correct buff? Does the Hero Stat ability has multiple levels? Etc etc...

So I'm suggesting to you to edit the map I attached and then import back into your own map. It might work (might).

This?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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