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: 292

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.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • 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 Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top