No idea on how to create this simple spell

Septimus

New Member
Reaction score
58
I cannot figure out and think how to create this spell.

Fortune Aura : Generate 1 gold per second.

Level 1 : Generate 1 gold per 10 second
Level 2 : Generate 1 gold per 9 second
Level 3 : Generate 1 gold per 8 second
Level 4 : Generate 1 gold per 7 second
Level 5 : Generate 1 gold per 6 second
Level 6 : Generate 1 gold per 5 second
Level 7 : Generate 1 gold per 4 second
Level 8 : Generate 1 gold per 3 second
Level 9 : Generate 1 gold per 2 second
Level 10 : Generate 1 gold per 1 second

Also, the spell must stop working if the unit with this aura is dead.
Is there any way to create it ?
 

Tyman2007

Ya Rly >.
Reaction score
74
Code:
Events -
    Time - Every Level Seconds of game time
Conditions -
Actions -
    Set Group = Units in region (Playable map area) matching (Matching unit has buff fortune aura) Equal to true
    Unit Group - Pick every unit in Group and do (Actions)
        Loop - Actions -
            Player - Add 1 gold to (Owner of (Picked Unit))

Coded by hand with no WE right now.. im a little busy so i had to type it.
ima make a trigger for the level seconds.

EDIT: Nvm.. i dont know any level up events. But if you find something like that then make sure to make an integer variable with an initial value of 10. Then do when the ability gains a level its Value -= 1
 

Septimus

New Member
Reaction score
58
The level is variable isn't it ? Which variable is that for ?
Did I need to make 10 dif trigger for this function ?
 

THE_X

New Member
Reaction score
49
you could do 10 triggers, and 10 different buffs, every 10 seconds of the game pick all units with buff (fortune aura [10])
add 1 gold

every 90 seconds of the game pick all units with buff (fortune aura [9]) blablaal see what i mean?
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Put Loads of if/thens that are looped into each other. So it can check the level, then have 10 different periodic triggers do the cash giving.
 

Septimus

New Member
Reaction score
58
Fortune Aura Skill
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Entire map)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Fortune Aura for (Picked unit)) Equal to 1
Then - Actions
Player - Add 1 to (Owner of (Picked unit)) Current gold
Else - Actions
Do nothing

I make it this way, but shall it been done this way. I would had to create 10 different trigger for it, is there any alternate way of shorten it ?
 

Tyman2007

Ya Rly >.
Reaction score
74
Ahhk. Can you PLEASE indent the lines. Hurting my eyes. Im afraid that there is no way in my mind. Have you tried JASS? lol.. jk.
 

THE_X

New Member
Reaction score
49
Code:
Fortune Aura Skill
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Entire map)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Fortune Aura for (Picked unit)) Equal to 1
Then - Actions
Player - Add 1 to (Owner of (Picked unit)) Current gold
Else - Actions
Do nothing

how are you gonna have 10 seconds intervul this way with detection(10 triggers is not that bad if you only have to change 2 things in each trigger)
 

Septimus

New Member
Reaction score
58
Ahhk. Can you PLEASE indent the lines. Hurting my eyes. Im afraid that there is no way in my mind. Have you tried JASS? lol.. jk.

Unfortunately, I only understand a bit about jass. If you ask me to make my own jass code, It gonna took me quite a long time to figure out how to do so. Since most of my map game play is simple, I never had the intention of using jass.

There is once I try to create a simple jass code for anti friendly-fire trigger and it took me more than a month to get it done in proper way. :p

I am just newbie when it comes to jass, even some function of gui and mui I still haven't familiar with it.

Code:
Fortune Aura Skill
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Entire map)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Fortune Aura for (Picked unit)) Equal to 1
Then - Actions
Player - Add 1 to (Owner of (Picked unit)) Current gold
Else - Actions
Do nothing

how are you gonna have 10 seconds intervul this way with detection(10 triggers is not that bad if you only have to change 2 things in each trigger)

Well, sometimes it would be better to had less trigger. It could possibly avoid any memory leak, I assume..
 

THE_X

New Member
Reaction score
49
that trigger leaks, to advoid the leak just remove it, its just that simple
 

vypur85

Hibernate
Reaction score
803
Ever played around with damage taken triggers? Few simple damage taken triggers:
Code:
Melee Initialization
    Events
        Map initialization
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                Unit Group - Add (Picked unit) to Unitgp_Var_Store
                Trigger - Add to Damage Taken <gen> the event (Unit - (Picked unit) Takes damage)

Code:
Enter
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        ((Triggering unit) is in Unitgp_Var_Store) Equal to False
    Actions
        Unit Group - Add (Triggering unit) to Unitgp_Var_Store
        Trigger - Add to Damage Taken <gen> the event (Unit - (Triggering unit) Takes damage)

Code:
Damage Taken
    Events
    Conditions
        (Level of Permanent Immolation  for (Damage source)) Greater than 0
    Actions
        Player - Add 1 to (Owner of (Triggering unit)) Current gold

Code:
Test
    Events
        Player - Player 1 (Red) skips a cinematic sequence
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Level of Permanent Immolation  for (Matching unit)) Greater than 0)) and do (Actions)
            Loop - Actions
                Unit - Increase level of Permanent Immolation  for (Picked unit)
                Player - Disable Permanent Immolation  for (Owner of (Picked unit))
                Player - Enable Permanent Immolation  for (Owner of (Picked unit))

Play around with the Perma Immolation ability. Set the duration to 10 for level 1, 9 for level 2 etc etc... Damage per second is set to 0.01 damage. Targets allowed is set to self, friend, invulnerable, vulnerable, ground and air. It should be MUI, I think. But Immolation damage doesn't stack, so... I'm not sure how much this would work. Else you could try using other methods suggested above. And this method doesn't show buff status. If you really want the buff status, just simply create a dummy unit to cast a dummy buff to the damage taken units. Make it last for 2 or 3 seconds.
 

Ub3r_

New Member
Reaction score
4
Code:
Fortune Aura
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 1
                    Then - Actions
                        Player - Add (Integer(0.10)) to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 2
                    Then - Actions
                        Player - Add (Integer(0.20)) to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 3
                    Then - Actions
                        Player - Add (Integer(0.30)) to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 4
                    Then - Actions
                        Player - Add (Integer(0.40)) to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 5
                    Then - Actions
                        Player - Add (Integer(0.50)) to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 6
                    Then - Actions
                        Player - Add (Integer(0.60)) to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 7
                    Then - Actions
                        Player - Add (Integer(0.70)) to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 8
                    Then - Actions
                        Player - Add (Integer(0.80)) to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 9
                    Then - Actions
                        Player - Add (Integer(0.90)) to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 10
                    Then - Actions
                        Player - Add (Integer(1.00)) to (Picked player) Current gold
                    Else - Actions

This should work with what you want.
 

Attachments

  • Fortune Aura.w3x
    16.8 KB · Views: 83

Septimus

New Member
Reaction score
58
Code:
Fortune Aura
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 1
                    Then - Actions
                        Player - Add 1 to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 2
                    Then - Actions
                        Player - Add 2 to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 3
                    Then - Actions
                        Player - Add 3 to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 4
                    Then - Actions
                        Player - Add 4 to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 5
                    Then - Actions
                        Player - Add 5 to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 6
                    Then - Actions
                        Player - Add 6 to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 7
                    Then - Actions
                        Player - Add 7 to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 8
                    Then - Actions
                        Player - Add 8 to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 9
                    Then - Actions
                        Player - Add 9 to (Picked player) Current gold
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of Fortune Aura for (Picked unit)) Equal to 10
                    Then - Actions
                        Player - Add 10 to (Picked player) Current gold
                    Else - Actions

Thats really the only way you can do it without making 10 triggers. Just use this, it's good enough.

I want it to generate 1 gold per second, the higher the level. The faster it generate instead of more gold would be generate per second.

This trigger of yours is not what I want.
 

chanta45

New Member
Reaction score
19
Just as someone suggested make 10 different triggers each running a timer at variable times, every time the timer expires pick heroes with the level of that trigger and give them gold.
 
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

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top