Passive Income Abillity!

Da_HP_Geek

New Member
Reaction score
8
Hi! How 2 do a passive income abillity with 1 gold per sec, first level, 2 g/s and then 3 g/s?

I have done this, but I dont know how to do the other trigger...

Trigger:
  • Passive Income
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Business Man
    • Actions
      • Set Player_Gold = (Owner of (Learning Hero))
      • Trigger - Turn on The other trigger <gen>
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Periodic event with 3 if then else. 1 pick all units with ability. If ability level equal to 1 then add 1 gold to owner of picked unit. And the same for level 2 and 3
 

Exfyre

hmm...
Reaction score
60
E
-Every 1 second
C
A
-Set g = All Units in Playable Map Area
-Pick every unit in g and do actions
--Player - Add (level of (gold_Abil) for (picked unit)) to (owner of (picked unit)) gold
-CS: call DestroyGroup(udg_g)


you can then delete the whole trigger you made and this will work. also is MUI (so more than one person or hero can have the spell)
 

Da_HP_Geek

New Member
Reaction score
8
Isn't then just this enough?

Trigger:
  • Gold
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Player - Add (Level of Business Man for (Picked unit)) to (Owner of (Picked unit)) Current gold)


Or is it any leaks in there I can remove?
 

SkateuUp

Member
Reaction score
4
the group leaks
edit: Custom script: call DestroyGroup (udg_Temp_Group)
editedit: exfyre made the trigger fine for you, leakless and all
 

Weegee

Go Weegee!
Reaction score
102
I dont think this will work but...

Trigger:
  • Bleh
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Your Spell
    • Actions
      • Set Int = (Int + 1)
      • Set SpellLvl[Int] = (Level of Your Spell for (Triggering unit))
      • Set Player[Int] = (Owner of (Triggering unit))


Trigger:
  • Bleh Copy
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to Int, do (Actions)
        • Loop - Actions
          • Player - Add SpellLvl[Int] to Player[Int] Current gold


And G is a unit group
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
In your periodic event the int should be integer A
 

LordXavier

TH.net Regular
Reaction score
16
You could try making it an auto-cast ability that does nothing and has 1 second cooldown.

Trigger:
  • Income
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to <Your Ability>
    • Actions
      • Trigger - Add to Income Give <gen> the event (Unit - (Casting unit) Finishes casting an ability)


Trigger:
  • Income Give
    • Events
    • Conditions
    • Actions
      • Player - Add 1 to (Owner of (Casting unit)) Current Gold

Edit: Unfortunately, with this way you'd have to have 2 of these triggers for every level of the ability or you could make it so when they get the second and third level it gives them a different ability, removing the original, thus making this work
Edit: Let me clarify that just in case, you have 3 abilities, the first 2 have 2 levels. When you get to the second level of one, you remove it and add the next ability to the unit, same thing with the second ability. just tell me if this still makes no sense, I will post the triggers I'm thinking of
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Seriously guys wtf is up with making more triggers? Exfyre's is perfectly fine. Da_HP_Geek only needs to know what kind of variable g is.

To answer it, g is a unit group variable.
 

LordXavier

TH.net Regular
Reaction score
16
Seriously guys wtf is up with making more triggers? Exfyre's is perfectly fine. Da_HP_Geek only needs to know what kind of variable g is.

To answer it, g is a unit group variable.

I didn't even look at Exfyre's, this is just my opinion on one way that works.
 

Da_HP_Geek

New Member
Reaction score
8
But it can't be... I made it to a group variable, and here I cant find "All Units in Playable Map Area".

You could make the spell fast in a map, show me, and let me shame ;)
 

LordXavier

TH.net Regular
Reaction score
16
But it can't be... I made it to a group variable, and here I cant find "All Units in Playable Map Area".

You could make the spell fast in a map, show me, and let me shame ;)

I decided to make a map with my idea in it. I used a gold coin icon and Button Manager I got from hiveworkshop to make the ability's auto-cast icon.
EDIT: sorry I need to fix a bit with the map.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Why did you post the map hes problem is solved
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Next time read all the posts to see where the problem is at is it solved or maby new problem. Ok
 

asipo

New Member
Reaction score
15
Another solution can be done like the caste fight.

You create an infinite unit, when the unit is finished created, kill it and add the gold.
There is another game use this tactic, but it for lumber. Cant recall the game name.

No need for every 1 second checking.
(somehow i hate the routine trigger cos i feel my game gonna be lag).

Btw, ability auto cast is really works?
What base spell its used? priest inner fire?
I thought some spell only auto casted upon certain event such as inner fire is cast when you unit is attacked.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top