System Heal

Discussion in 'Systems and Snippets' started by kingkingyyk3, Dec 16, 2009.

  1. kingkingyyk3

    kingkingyyk3 Visitor (Welcome to the Jungle, Baby!)

    Ratings:
    +216 / 0 / -0
    Unit 1 Heals Unit 3 for 100
    Unit 2 Heals Unit 3 for 200 (at the the same time)

    It is instant, it will not return wrong value.

    set StackLevel = StackLevel + 1
    This solved the problem that you use HealUnit in heal event callbacks.
     
  2. hgkjfhfdsj

    hgkjfhfdsj Active Member

    Ratings:
    +55 / 0 / -0
    so GetAmount() should give 300?
     
  3. kingkingyyk3

    kingkingyyk3 Visitor (Welcome to the Jungle, Baby!)

    Ratings:
    +216 / 0 / -0
    No, it will return 100(First turn of callbacks) and 200(Second turn of callbacks) instead.
     
  4. hgkjfhfdsj

    hgkjfhfdsj Active Member

    Ratings:
    +55 / 0 / -0
    ok.. so
    ie GetAmount() gives 300 on first turn (since assuming the two heals occurs at the same time)
    how to add the 2nd call (200) to the 1st call (100) amount to the same stacklevel?
     
  5. kingkingyyk3

    kingkingyyk3 Visitor (Welcome to the Jungle, Baby!)

    Ratings:
    +216 / 0 / -0
    (since assuming the two heals occurs at the same time)
    No chance to occur.
     
  6. hgkjfhfdsj

    hgkjfhfdsj Active Member

    Ratings:
    +55 / 0 / -0
    No chance to occur.
    ok..one more question:
    [DEL]what do you mean by recursively defined?[/DEL] but more importantly, what/how does the stacklevel thingy solve it??
    ty (again):)
     
  7. kingkingyyk3

    kingkingyyk3 Visitor (Welcome to the Jungle, Baby!)

    Ratings:
    +216 / 0 / -0
    but more importantly, what/how does the stacklevel thingy solve it??
    I meant it solved recursion.
     
  8. kingkingyyk3

    kingkingyyk3 Visitor (Welcome to the Jungle, Baby!)

    Ratings:
    +216 / 0 / -0
    A little-efficiency-gain update is up!
     
  9. kingkingyyk3

    kingkingyyk3 Visitor (Welcome to the Jungle, Baby!)

    Ratings:
    +216 / 0 / -0
    Updated to v2.0.0
     
  10. Juggernaut

    Juggernaut I don't know what to change it to

    Ratings:
    +32 / 0 / -0
    how to use this ?
     
  11. kingkingyyk3

    kingkingyyk3 Visitor (Welcome to the Jungle, Baby!)

    Ratings:
    +216 / 0 / -0
    It is basically similar to Damage event. :)
    The demo map should give some hints.
     

Share This Page