Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Percentage Healing
Percentage Healing
This topic is locked. You can no longer write replies here.
Jul 7 2008, 5:28 pm
By: Cheathunta  

Jul 7 2008, 5:28 pm Cheathunta Post #1



How do you make it so that if a player tries to heal a unit, it only restaores te percentage of HP it has. You know like in DBZ Maps. How do you do this?



None.

Jul 7 2008, 5:42 pm CecilSunkure Post #2



Elaborate a bit, the percentage of HP it has is restored? Is the player trying to heal with a medic, or a trigger, or what? I don't know what you are asking.



None.

Jul 7 2008, 5:45 pm Hug A Zergling Post #3



They use triggers to heal in DBZ (im pretty sure) not medics



None.

Jul 7 2008, 5:53 pm Lt.Church Post #4



you mean like cell or buu i forgot had like HEAL to 60% in starforge id go something like this
Trigger
Players

  • CurrentPlayer
  • Conditions

  • Bring(CurrentPlayer,Exactly,1,Defiler,LocOfHeal);
  • Accumulate(CurrentPlayer,AtLeast,800,Gas);
  • Actions

  • SetResources(CurrentPlayer,Subtract,800,Gas);
  • ModifyUnitHitPoints(All,Buu,CurrentPlayer,BuuLoc,60);
  • MoveUnit(All,Defiler,CurrentPlayer,LocOfHeal,LocReturn);
  • PreserveTrigger();


  • thats basically it change current player to whatever player u want, change defiler to whatever triggering system you want etc. etc. locofheal would be the beacon or location zone of your trigger area "ModifyUnitHitPoints" is the trigger youre looking for i believe anyways.

    edit: is it just me is the trigger BBcode not working?



    None.

    Jul 7 2008, 6:05 pm Cheathunta Post #5



    What i mean is, you level up, you have a percentage of hp. You bring the unit with that percentage of hp , and it only gives you that percentage. Everytime you Level, it changes, so how do i do this? Its in plenty of dbz maps.



    None.

    Jul 7 2008, 6:29 pm CecilSunkure Post #6



    Quote from Cheathunter
    What i mean is, you level up, you have a percentage of hp. You bring the unit with that percentage of hp , and it only gives you that percentage. Everytime you Level, it changes, so how do i do this? Its in plenty of dbz maps.

    Oh well you would need a trigger for detecting each level the player is at, and you need a trigger for each lvl up.

    Here are the triggers you would need for healing at a certain lvl:

    -Condition:
    -Switch 'p1 lvl 1' is set
    -Bring 'Unit' to 'Healloc'

    -Actions:
    -Modify unit health at 'healloc' to 10%
    -preserve trigger

    And for lvl 2 you would need:

    -Condition:
    -Switch 'p1 lvl 2' is set
    -Bring 'Unit' to 'Healloc'

    -Actions:
    -Modify unit health at 'healloc' to 20%
    -preserve trigger

    And so on for each lvl. For a trigger to lvl up you just need to decide how you want your player to lvl up. And once your player reaches that how then you set the switch for that lvl, and clear the previous switch for the previous lvl.

    Here is an example:

    -Condition:
    -Current player score kills/razings is at least 5000

    -Action:
    -Set switch 'p1 lvl 1'

    Then for lvl 2 you would have:

    -Condition:
    -Current player score kills/razings is at least 10000

    -Action:
    -Set switch 'p1 lvl 2'
    -Clear switch 'p1 lvl 1'

    And there you have it! Hope that helps :P



    None.

    Jul 7 2008, 7:12 pm NudeRaider Post #7

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    basically yes, but store the level in a death counter instead of 10 switches.




    Jul 7 2008, 7:17 pm CecilSunkure Post #8



    Yeah, i've had problems with switches, bugs and such. Only switches that I have renamed, and in an RPG I am making, I am having to remake a lot of triggers, actually almost everyone, and change them to use death counts. It's best to stay away from switches and waits.. I learned the extremely hard way and now im about a week behind on this map im making.



    None.

    Jul 7 2008, 10:07 pm Cheathunta Post #9



    I've found a way to do this. I think that, every time someone levels up, i set some death counts. Ive figured out what to do :D



    None.

    Jul 8 2008, 9:27 am NudeRaider Post #10

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    Quote from Cheathunter
    I've found a way to do this. I think that, every time someone levels up, i set some death counts. Ive figured out what to do :D
    I'm not sure if you got how simple it can be done. You take one unused unit (e.g. neutral - neutral - cantina) for all Players, as each player has its own death count. In your level-up trigger add 1 for cantina for Current Player.
    In all triggers that depend on the player's level add this condition: Current Player has exactly x deaths of cantina.

    You might want to rename cantina to something like LEVEL.




    Jul 8 2008, 12:48 pm Clokr_ Post #11



    Yeah, that's pretty much it. One healing trigger for each HP percentage you want. You choose which one should be triggered based on the value of a DC. Each time the player levels up you add one to that DC.
    Use Current Player to avoid doing extra work. Also use an unused unit to avoid SC changing it.



    ?????

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [09:24 pm]
    Moose -- denis
    [05:00 pm]
    lil-Inferno -- benis
    [10:41 am]
    v9bettel -- Nice
    [01:39 am]
    Ultraviolet -- no u elky skeleton guy, I'll use em better
    [2024-4-18. : 10:50 pm]
    Vrael -- Ultraviolet
    Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
    hey cut it out I'm getting all the minerals
    [2024-4-18. : 10:11 pm]
    Ultraviolet -- :P
    [2024-4-18. : 10:11 pm]
    Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
    [2024-4-17. : 11:50 pm]
    O)FaRTy1billion[MM] -- nice, now i have more than enough
    [2024-4-17. : 11:49 pm]
    O)FaRTy1billion[MM] -- if i don't gamble them away first
    [2024-4-17. : 11:49 pm]
    O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
    Please log in to shout.


    Members Online: C(a)HeK, Roy, RIVE