Interest Ability

CBBPhoenix

New Member
Reaction score
1
Hey guys

I am making a hero which should be based on economy-skills and one of its abilities should give interest of current gold every five minutes. I have tried using this action for the periodic event:
Player -Add property - add(Owner of(random unit from(units in playable map area matching(level of Interest for Matching Unit equal to 1) current gold X (1/7) to (owner of (Matching Unit's)) current gold. I would perfer using reals and not integers for the interest as it would give at least 100% in that case.
The problem is that no gold is added using this trigger; not even if I use a set value instead of a function :confused:

Anyone has any ideas? Thanks in advance :)
 

kirinelf

New Member
Reaction score
10
Hmm... I THINK I know a way to solve your problem, but I'm not sure. Gimme a while to get things in order and I'll give it a shot. In the meantime, let's hope someone else pops in who can help.

Edit: I haven't tested this yet, but try this:

Trigger:
  • Interest
    • Events
      • Time - Every 300.00 seconds of game time
    • Conditions
      • (Level of [Interest] for [Hero]) Greater than 0
    • Actions
      • Set [BonusIncome] = (((Owner of [Hero]) Current gold) x (7 / 10))
      • Player - Add BonusIncome to (Owner of [Hero]) Current gold


[Interest] is the ability that gives you the Interest. It should be a passive skill with everything (damage, AoE, everything) set to 0.
[Hero] is a unit type variable that is assigned to the hero with the skill.
[BonusIncome] is an integer variable. All you have to do is make it.

As far as I can see, this isn't MUI (Multi Unit uh... something that starts with I, which means that more than one unit can use it at the same time). So if my method works (Not sure if it actually does), it only does for one unit. Try it and see if it works.
 

Joccaren

You can change this now in User CP.
Reaction score
54
MUI: Multiple Unit Instance.

To make MUI, just use arrays or If, then, elses
 

DK's Pride

New Member
Reaction score
7
Add variables for each player to make it MPI - - - - Multi Player Instance

(I dont think its important that u have it MUI as u only have 1 of each Hero)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
@ kirinelf: Well, the way you put it up, makes it non-MUI, but by just changing it a little, it'll become MUI ;)

Trigger:
  • Interest
    • Events
      • Time - Every 300.00 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and ((Level of Acid Bomb for (Matching unit)) Greater than 0)))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Player - Add (((Owner of (Picked unit)) Current gold) x (1 / 7)) to (Owner of (Picked unit)) Current gold
      • Custom script: call DestroyGroup(udg_TempGroup)


@ DK's Pride: Please don't just assume stuff... Do some research before saying stuff like that.
 

CBBPhoenix

New Member
Reaction score
1
Mui

Does it matter at all whether it's MUI or not? I only allow one of each hero type in the map. These triggers look a lot like my own but I'll try them :p the problem is that when the hero level-ups the skill, it should give 1/6 X Currrent gold, 1/5 X Current gold.. etc income.. and level higher than 0 only works for level 1... But I assume I can simply use an "equal to" integer comparrision?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
No, I'll change it to suit your needs... Just give me a sec ;)

EDIT: Here :D

Trigger:
  • Interest
    • Events
      • Time - Every 300.00 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and ((Level of "Interest Ability" for (Matching unit)) Greater than 0)))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Player - Add (((Owner of (Picked unit)) Current gold) x (1 / (8 - (Level of "Interest Ability" for (Picked unit))))) to (Owner of (Picked unit)) Current gold
      • Custom script: call DestroyGroup(udg_TempGroup)
 

CBBPhoenix

New Member
Reaction score
1
okay

okay sounds good :p I am going to test it now. I just hope it wont return 0 gold each interval as the old one :-/

I've tried it but it does not add anything to the gold amount of the player. I am posting a screenshot. Might have missed something.
 

Attachments

  • ss5.gif
    ss5.gif
    6.5 KB · Views: 293

Joccaren

You can change this now in User CP.
Reaction score
54
The only thing I can see you've missed is the 'Matching unit is a Hero' part which I don't think is required. BTW, it may be easier to use WC3 tags rather than post screenshots (I used to do that until I found out about WC3 tags). To use the tags, right click the page Icon at the top of your trigger, select copy as text. Then just click the WC3 tags icon (The yellow a) in your post then paste your trigger as text between the two tags.
 

CBBPhoenix

New Member
Reaction score
1
So you can copy directly from the editor? Nice. :D still my ability problem is not solved yet, I can't believe that it should have anything to do with the Hero comparison...
 

Joccaren

You can change this now in User CP.
Reaction score
54
Two things
1. does WE recognise that 1/8 still counts as a number? I can think of multiple reasons why it wouldn't
2. 1/(8-level of interest for Player X))???
Thats making you get less interest each level of the ability. Try + level of interest
 

CBBPhoenix

New Member
Reaction score
1
hmm

Well I might check up on the number thing, could be a solution. The reason why 1/(8 - level of interest) gets better at higher levels is because it is a reciprocal number. It will (or should very likely) be lvl1 = 1/7 = 0.14. lvl2 = 1/6 = 0.17 etc
 

Joccaren

You can change this now in User CP.
Reaction score
54
Trigger:
  • Interest
    • Events
      • Time - Every 300.00 seconds of game time
    • Conditions
    • Actions
      • Set Interest = ((Player X (Colour) Current gold) / (8 - (Level of Interest for (Triggering unit))))
      • Player - Add Interest to Player X (Colour) Current gold

Try that. Not MPI but that can be changed by using arrays for the variables
Oops, forgot to add 'Level of Interest for Unit X is greater than 0'

Pretty much what has already been posted by Kirinelf, only solution to how to make it MPI and multi leveled.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    Happy Thursday!
  • 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

      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