• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) đź”—Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans đź”—Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!
Bannar
Reaction score
292

Profile posts Latest activity Postings Experience Albums Resources About Medals

  • Pastebin.w3x I am still adding final touches, but this seems to work a little better than before. I realized I should be testing it in a small map with no other triggers and the lag practically disappeared. However, I am fairly sure that if it was used in a 4-8 player map it would lag again. Also, I realized there is a limit to floatin' text. This will be a problem.

    HP Units init
    Events
    Time - Elapsed game time is 0.01 seconds
    Conditions
    Actions
    -------- Selects all units already in the map to get HP bars --------
    Set Mana_Group = (Units in (Playable map area))
    Unit Group - Pick every unit in Mana_Group and do (Actions)
    Loop - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Life of (Picked unit)) Greater than or equal to 100.00
    (Owner of (Triggering unit)) Not equal to Neutral Passive
    Then - Actions
    -------- Sets the length of the Bar --------
    Set StateString = llllllllllllllllllllllllllllllllllllllllllllllllllllllllll
    Set HP_int = (HP_int + 1)
    -------- sets an index number for each of the units --------
    Set HP_Unit[HP_int] = (Picked unit)
    Set HPstatus = (((Life of (Picked unit)) / (Max life of (Picked unit))) x (Real((Length of StateString))))
    Set tempp1 = (Position of HP_Unit[HP_int])
    Set tempp2 = (tempp1 offset by 40.00 towards 180.00 degrees)
    Floating Text - Create floating text that reads StateString at tempp2 with Z offset 0.00, using font size 4.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
    Set HP_Text[HP_int] = (Last created floating text)
    Floating Text - Show (Last created floating text) for (All players)
    Custom script: call RemoveLocation(udg_tempp1)
    Custom script: call RemoveLocation(udg_tempp2)
    Trigger - Turn on Loops <gen>
    Else - Actions
    Custom script: call DestroyGroup(udg_Mana_Group)
    Add HP Units
    Events
    Unit - A unit enters (Entire map)
    Unit - A unit Finishes reviving
    Conditions
    Actions
    -------- Sets the length of the Bar --------
    Set StateString = llllllllllllllllllllllllllllllllllllllllllllllllllllllllll
    Set HP_int = (HP_int + 1)
    -------- sets an index number for each of the units --------
    Set HPstatus = (((Life of (Triggering unit)) / (Max life of (Triggering unit))) x (Real((Length of StateString))))
    Set HP_Unit[HP_int] = (Triggering unit)
    Set tempp1 = (Position of HP_Unit[HP_int])
    Set tempp2 = (tempp1 offset by 40.00 towards 180.00 degrees)
    Floating Text - Create floating text that reads StateString at tempp2 with Z offset 0.00, using font size 4.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
    Set HP_Text[HP_int] = (Last created floating text)
    Floating Text - Show (Last created floating text) for (All players)
    Custom script: call RemoveLocation(udg_tempp1)
    Custom script: call RemoveLocation(udg_tempp2)



    The loop is too long now to post in a VM.
    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