1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  4. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  5. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

DBZ Transformation Health Help

Discussion in 'Triggers & Scripts' started by Assassins-Creed, May 23, 2011.

  1. Assassins-Creed

    Assassins-Creed

    Joined:
    Aug 6, 2009
    Messages:
    663
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Alrght so what I am asking is if you guys could help me and a friend out with a DBZ Transformation I made,I made it pretty much just like DBZ Tribute except when you revert when your damage,you have about 1 little drop of health and a small amount of mana.My question is what could I do to make it so you don't end up with 1 health point when you revert.Here is a transformation trigger. Also +rep to correct answer.

    Super Saiyan

    • Events
      • Player - Player 1 (Red) types a chat message containing ss as An exact match
    • Conditions
      • (Mana of |cffa52a2aSavior of Earth|r 0190 <gen>) Greater than 100.00
      • (Real((Hero level of |cffa52a2aSavior of Earth|r 0190 <gen>))) Greater than or equal to 2.00
      • Goku Not equal to 1.00
      • Goku Not equal to 2.00
      • Goku Not equal to 3.00
    • Actions
      • Sound - Play SuperSaiyan <gen>
      • Hero - Modify Strength of |cffa52a2aSavior of Earth|r 0190 <gen>: Set to ((Strength of |cffa52a2aSavior of Earth|r 0190 <gen> (Exclude bonuses)) x 2)
      • Hero - Modify Agility of |cffa52a2aSavior of Earth|r 0190 <gen>: Set to ((Agility of |cffa52a2aSavior of Earth|r 0190 <gen> (Exclude bonuses)) x 2)
      • Hero - Modify Intelligence of |cffa52a2aSavior of Earth|r 0190 <gen>: Set to ((Intelligence of |cffa52a2aSavior of Earth|r 0190 <gen> (Exclude bonuses)) x 2)
      • Unit - Change color of |cffa52a2aSavior of Earth|r 0190 <gen> to Yellow
      • Set Goku = 1.00


    Drain and Special Effects

    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • Goku Equal to 1.00
    • Actions
      • Special Effect - Create a special effect attached to the origin of |cffa52a2aSavior of Earth|r 0190 <gen> using Abilities\Spells\Other\HealingSpray\HealBottleMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of |cffa52a2aSavior of Earth|r 0190 <gen> using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of |cffa52a2aSavior of Earth|r 0190 <gen> using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Set mana of |cffa52a2aSavior of Earth|r 0190 <gen> to ((Mana of |cffa52a2aSavior of Earth|r 0190 <gen>) - ((Real((Intelligence of |cffa52a2aSavior of Earth|r 0190 <gen> (Exclude bonuses)))) / 5.00))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Mana of |cffa52a2aSavior of Earth|r 0190 <gen>) Less than or equal to 100.00
        • Then - Actions
          • Unit - Change color of |cffa52a2aSavior of Earth|r 0190 <gen> to Red
          • Hero - Modify Strength of |cffa52a2aSavior of Earth|r 0190 <gen>: Set to ((Strength of |cffa52a2aSavior of Earth|r 0190 <gen> (Exclude bonuses)) / 2)
          • Hero - Modify Agility of |cffa52a2aSavior of Earth|r 0190 <gen>: Set to ((Agility of |cffa52a2aSavior of Earth|r 0190 <gen> (Exclude bonuses)) / 2)
          • Hero - Modify Intelligence of |cffa52a2aSavior of Earth|r 0190 <gen>: Set to ((Intelligence of |cffa52a2aSavior of Earth|r 0190 <gen> (Exclude bonuses)) / 2)
          • Set Goku = 0.00
        • Else - Actions
     
  2. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,174
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Do you mean the unit reverts when it is damaged?

    You could just increase the health of the unit with Unit - Set life to value or Unit - Set life to percentage.
     
  3. Assassins-Creed

    Assassins-Creed

    Joined:
    Aug 6, 2009
    Messages:
    663
    Resources:
    1
    Maps:
    1
    Resources:
    1
    No when player 1 types revert it reverts the hero to its normal form,then the unit's health would go down to 1 hp (not max health) if the hero was damaged in the super saiyan form. Also if I used the set to life thing like just gave it +500 hp,a lot of players would abuse it and just type ss then revert then ss then revert.
     
  4. Arisato

    Arisato

    Joined:
    Dec 17, 2009
    Messages:
    991
    Resources:
    7
    Models:
    1
    Maps:
    4
    Spells:
    1
    Tutorials:
    1
    Resources:
    7
    turn on the looping trigger when the ability is executed
    use booleans, they are better.
     
  5. Assassins-Creed

    Assassins-Creed

    Joined:
    Aug 6, 2009
    Messages:
    663
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Um....thanks? I wasn't really asking on how to make this better though,only how to make the health not decrease....
     
  6. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    Why not you just use Transform-based ability ?
    Like Bear Form
     
  7. Arisato

    Arisato

    Joined:
    Dec 17, 2009
    Messages:
    991
    Resources:
    7
    Models:
    1
    Maps:
    4
    Spells:
    1
    Tutorials:
    1
    Resources:
    7
    or crow form?
     
  8. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    I think you're bugging the spell with the modifying action.
     
  9. dardas

    dardas

    Joined:
    Sep 12, 2008
    Messages:
    649
    Resources:
    0
    Resources:
    0
    Welll.. imagine goku has 10 agility at start,
    20 after transform.
    he levels up twice, 24 agility now, +2 per level
    now he reverts, he got 12 agility, not 14.
    that would be very buggy, i sugguest using another integer to check the amount increased, then decrease that amount..
    btw, goku should really be an integer, a real is just.. stupid?
    and boolean would require 1 per transformation, so i donno, up to him if its dynamic.
    Anyhow, about the health part, just get the percent life, and set life after transformation to that percent,
    would make him keep the exact percent he had when he was at "ss" mode.
    so 100 hp, 200 max hp.
    lets say he gets 1 hp per str, he got 50 str,
    so he got 150 max hp without str,
    now he gets ss mode, 250 max hp:

    100/200 = 0.5 // regular life without ss
    x/250 = 0.5 // life with ss
    x = 0.5 * 250 // just continuing the equation
    x = 125 hp. // heres you're answer, 125 hp is 50% of 250.
    so i guess that should be satisfying.. or just get his full life, not percent right before reverting, then get him to that exact life after he reverts.

    Hope that i helped..
    If i didnt get the question right, tell me, since im really tired right now..
     
  10. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    Yes, and the changed/modified stats should be saved in a variable for accurate revert stats.
    Not just silly "divide by 2" method lol
     
  11. Arisato

    Arisato

    Joined:
    Dec 17, 2009
    Messages:
    991
    Resources:
    7
    Models:
    1
    Maps:
    4
    Spells:
    1
    Tutorials:
    1
    Resources:
    7
    i've experienced that, open my Roars of Ancients v1.7(unprotected, v1.8++ is prtected)

    Search for the Shadow Stalker(Raika the Shadow Stalker)

    Trigger location

    Shadow Stalker->Hunter in the Night(if i were correct)

    each level increase the integer by (how many points of the increment of your hero's attribute poin)
     
  12. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,955
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    The problem is the lost stats is causing the hero to lose current hitpoints. Try storing the unit's hitpoints as a percentage of current over maximum. Then revert the hero. Then restore the unit hitpoint percentage to be what it was orignally.

    Percentage = current/maximum
    current = percentage*maximum

    Note that 99% is the same as 0.99. You want to use the multiple form so do not multiply by 100.
     
  13. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    As I said, the problem lies with bad calculation.