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 :)
 
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.
 
MUI: Multiple Unit Instance.

To make MUI, just use arrays or If, then, elses
 
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)
 
@ 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.
 
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?
 
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)
 
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: 297
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.
 
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...
 
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
 
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
 
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.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • 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 Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top