• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
Bannar
Reaction score
281

Profile posts Latest activity Postings Experience Albums Resources About Medals

  • Hi Bannar,

    I've been trying to work with your floating text mana bar system you made a long time ago. Did you ever get the bugs out of it? It seems like hashtables have mini leaks and create lag over. I tried to re-create it with indexs and arrays, but even though there are no leaks, it still overloads the system. I did make them change color with health/mana amount and made them disappear when the unit wasn't visible to a player, but I'm still stuck with lag. Any advise?

    -Legal_Ease

    HP loop
    Events
    Time - Every 0.08 seconds of game time
    Conditions
    Actions
    For each (Integer A) from 1 to HP_int, do (Actions)
    Loop - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (HP_Unit[(Integer A)] is alive) Equal to True
    Then - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (HP_Unit[(Integer A)] is A structure) Equal to True
    Then - Actions
    Set StateString = llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
    Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (HP_Unit[(Integer A)] is A peon-type unit) Not equal to True
    Then - Actions
    Set StateString = llllllllllllllllllllllllllllllllllllllllllllllllllllllllll
    Else - Actions
    Set StateString = llllllllllllllllllllllllllllll
    Set tempp1 = (Position of HP_Unit[(Integer A)])
    Set tempp2 = (tempp1 offset by 80.00 towards 180.00 degrees)
    Floating Text - Change the position of HP_Text[(Integer A)] to tempp2 with Z offset 200.00
    Custom script: call RemoveLocation(udg_tempp1)
    Custom script: call RemoveLocation(udg_tempp2)
    Set HPstatus = (((Life of HP_Unit[(Integer A)]) / (Max life of HP_Unit[(Integer A)])) x (Real((Length of StateString))))
    Set HP_Bar_Color[(Integer A)] = (String((99 - (Integer(((Percentage life of HP_Unit[(Integer A)]) - 11.00))))))
    Floating Text - Change text of HP_Text[(Integer A)] to ((((|c00 + (HP_Bar_Color[(Integer A)] + ((String((Integer(((Percentage life of HP_Unit[(Integer A)]) - 1.00))))) + 00))) + (Substring(StateString, 1, (Integer(ManaStatus))))) + |r) + ((|c00000000 + (Substring(StateString, (Integer((HPstatus + 1.00))), (Length using font size 4.00
    For each (Integer B) from 1 to 4, do (Actions)
    Loop - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (HP_Unit[(Integer A)] is visible to (Player((Integer B)))) Equal to True
    Then - Actions
    Set Mana_PlayerB = (Player((Integer B)))
    Set Mana_PlayerGroup = (Player group(Mana_PlayerB))
    Floating Text - Show HP_Text[(Integer A)] for Mana_PlayerGroup
    Custom script: call DestroyForce(udg_Mana_PlayerGroup)
    Else - Actions
    Set Mana_PlayerB = (Player((Integer B)))
    Set Mana_PlayerGroup = (Player group(Mana_PlayerB))
    Floating Text - Hide HP_Text[(Integer A)] for Mana_PlayerGroup
    Custom script: call DestroyForce(udg_Mana_PlayerGroup)
    Else - Actions
    Floating Text - Destroy HP_Text[(Integer A)]
    ----------
    Gonna talk to Ralle about bananas.
    ----------
    What's the deal with the Banana nick?
    What's its origin if you don't mind replying :p
    Eh, he uses a resource called Trigger, now. To be honest, the event thing should just be TriggerRegisterVariableEvent. For the DamageEvent GUI/vJass hybrid I'm developing now, I made this function:


    function CreateDamageTrigger takes string variable, real value, code run returns trigger
    set tempTrig = CreateTrigger()
    call TriggerRegisterVariableEvent(tempTrig, variable, EQUAL, value)
    call TriggerAddCondition(tempTrig, Filter(run))
    return tempTrig
    endfunction


    Straightforward, fast, and gives you access to the trigger easily.
    Oh, man, it was your birthday yesterday. I didn't know. :s
    But, then I wish you a happy day today! :D
    Happy Birthday! (Happy Birthday!)



    <span style="font-size: 12px">Here is a cake.</span>

    . . . ., ., ., .,. . . . .
    . . .__|__|__|__|__ . . .
    . . .|~~::~~~~::~~| . . .
    . . .|~!!~~~~~~!!~| . . .
    . . .|<(><)><(><)>| . . .
    . . .|}{}{}{}{}{}{| . . .
    _________________________

    <span style="font-size: 12px">Here is your present.</span>

    . . . . . . .\ &&& /. . . . . . .
    . . . . . . ./<span style="font-size: 15px">*&*</span>\. . . . . . .
    |~~~~~|~~~~|~~~~~|
    |~'0~0'~|~~~~|~'0~0'~|
    |~'0~0'~|~~~~|~'0~0'~|
    |~~~~~|~~~~|~~~~~|
    |~~~~~|~~~~|~~~~~|
    |~'0~0'~|~~~~|~'0~0'~|
    |~'0~0'~|~~~~|~'0~0'~|
    |~~~~~|~~~~|~~~~~|
    Thanks, man! We start new Zephyr contest, in case you are interested in any kind of participating:).
    By the way, I like your Vector library and it's API much. Is there any chance you get back to work on it?
    Hey, no problem, man. The Judging can't really be collated without the Polling anyway, so you have had until the end of the Poll one way or another. And perhaps even a bit after that; historically Judging can take a while (especially when done right) (though we all appreciate when it doesn't :p).

    Let me know, and (depending somewhat on the end-result of the Poll) I'll be organizing it all shortly. Ish.
    Well, I don't want to declare and host a crappy contest. So I will invite some real qualified users like you to be a judge at Zephyr Contest #12.

    So are you interested? :)
    Hello,

    Perhaps you are interested to participate in Zephyr Contest #12?
    (It's the theme polling thread, link to the contest is available there)
    ----------
    I get your point, but I don't think Bribe's DE is as inferior to lfh' one as you think. You can speak with mods if you wish to.
    ----------
    I don't want to depreciate Bribe's, it was just I noticed you had a post saying Bribe's was the best when it isn't. Does Bribe's system detect all 3 types of damage in wc3? Physical, Magical, Code?
    Phew, you will judge the current hero contest huh? Give me perfect scores or I will call you banana for the rest of your life!
    No, the wrapping has to be changed. And that incurs a price of 30 euros.
    Hey do you wanna be partners on a project I'm working on, I can pm you with some screenshots for some motivating.
    Sure, why not. You're good, right? :p Lol, I'll go ahead & add you to the list. Thanks!

    //EDIT// - You don't have any qualms/questions about the Judging process or (importantly) the Criteria that you should be using, right?
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top