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

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.

      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