SUPPORT ACCOUNT CLANS
Welcome, Unregistered.
 

Thread: Disconnect button (at game end)

Page 1 of 2 12 LastLast
Results 1 to 20 of 34
  1. #1
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408

    Disconnect button (at game end)

    Disconnect button (at game end)
    *updated on 27 Aug 2009 04:10 GMT-5*


    ***Does not work on Regular ratio screens (4:3) right now, and only works on Widescreen (16:9). If I find the chance to plug in my old 4:3 LCD, I'll be able to release another version for it.

    ***Update causes the game.interface file to be reloaded after being pressed to fix a bug for now.

    I created this mod because some people (like me) get really tired of having to press three buttons to leave at the end of a game to leave it. This mod adds a button that slides down from the top of the screen (where the voting panel comes down from). It's a big blue Disconnect button which makes it easy and instant to leave a game and return to the game's lobby.

    For those who are wondering, when you click the button, it sends "disconnect" to the console instantly. You can achieve the same effect by pressing Ctrl+F8 during the game and typing disconnect.

    The button slide down occurs when either one of the main building's health drops to zero.

    ***** Screenshot coming soon! *****

    Note: This mod will NOT work with other game.interface mods currently, because it adds two lines of code to that file. I will add it in some of my combination mods soon.
    __________________________________________________ ___________

    Installation
    To install, download this file into the games folder game/ folder. The default locations for these are:

    Linux: /home/<username>/HoN/game/
    Windows 7: C:\Program Files\Heroes of Newerth\game\
    Windows Vista: C:\Program Files\Heroes of Newerth\game\
    Windows XP: C:\Program Files\Heroes of Newerth\game\
    Mac:
    1. Press Finder
    2. Press Applications
    3. Right click 'Heroes of Newerth', and press Show containing files
    4. Open Game folder
    5. Move file here

    __________________________________________________ ___________
    Changelog

    0.2.1 (27 Aug 2009 04:10 GMT-5):
    - Bug was found. After clicking the disconnect button and joining another game, the button stays up in the next game from the beginning. This is probably not the best solution, but I added a "reloadinterface game" command when you click the button, so there might be a slight ~1 second pause after clicking the button. That's normal, but let me know if your pauses are very long (5-10 second range).

    0.2.0 (26 Aug 2009 10:25 GMT-5):
    - It should now be fully working. It shows when the base's health is below 0.1% (so around 45hp left).

    0.1.1 (25 Aug 2009 23:40 GMT-5):
    - Found that initial release was broken
    - Tried to fix, and it works to an extent, but still now how I want it. Consider this to still be in beta.

    0.1.0 (25 Aug 2009 22:20 GMT-5):
    - Initial release.

    _____________________

    This is officially modification 025 in the Modification Repository!


    Check out other mods by users by clicking here!
    Last edited by MaxGhost; 08-27-2009 at 09:45 PM.

  2. #2
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    :/ It's not working right now... -.-

  3. #3
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Nova Scotia, Canada
    Posts
    892
    Someone was asking for this in clan chat about an hour ago, nice.

  4. #4
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    Los Angeles, CA
    Posts
    252
    where do we download?

  5. #5
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Released an update. How I was trying to make it work is that when main building hp = 0, trigger the slide to show the button. That didn't always work. I tried doing 0.1, but that made the slide happen when the base's hp was around 460hp. Then I tried 0.000001, that didn't work at all, then I tried 0.01, didn't work either. So the released version is with 0.1 for now, but I'll try and figure it out. (by the way those numbers are in percentage, so right now, it's at 10% hp).

    I'll try to find a more sure-fire way to do it, but for now this'll have to do.

    Quote Originally Posted by rhave View Post
    where do we download?
    I just updated it. The link is in the installation section. Sorry.

  6. #6
    Offline
    Account Icon
    Join Date
    Aug 2009
    Location
    Germany / DON
    Posts
    220
    could you post a screenshot? would be nice to see how this looks

  7. #7
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Quote Originally Posted by Fleder View Post
    could you post a screenshot? would be nice to see how this looks
    Yeah... my problem is that it's not properly working, and I only got it to slide out once out of like 6 times, so I really don't know what's going on...

  8. #8
    Offline
    Account Icon
    Join Date
    Jun 2009
    Posts
    273
    Quote Originally Posted by MaxGhost View Post
    Yeah... my problem is that it's not properly working, and I only got it to slide out once out of like 6 times, so I really don't know what's going on...
    Max maybe because you set it to to trigger at .1 (at least that's what I think you did). Well what it goes from a higher number to .0

  9. #9
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Quote Originally Posted by Tehwildcard View Post
    Max maybe because you set it to to trigger at .1 (at least that's what I think you did). Well what it goes from a higher number to .0
    But... Then it wouldn't be an if statement, it would be a while statement... I'm so confused... cause I did "param lt 0.1"

    Edit: thanks for helping me test it tehwildcard. Released a new version which should fix the problems.
    Last edited by MaxGhost; 08-26-2009 at 10:27 AM.

  10. #10
    I would use this if you had it dropdown when a team concedes as well
    Would be a cool future feature

  11. #11
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Quote Originally Posted by Jiggaboo View Post
    I would use this if you had it dropdown when a team concedes as well
    Would be a cool future feature
    Yup... workin on it.

  12. #12
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Update. Read the changelog in OP.

  13. #13
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    Canada
    Posts
    3,256
    For the 'bug' you found, can't you have the button slide back up when it's clicked?
    I'm an honest guy who's not afraid to be blunt. Hope you can handle that.

  14. #14
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Quote Originally Posted by Warchamp7 View Post
    For the 'bug' you found, can't you have the button slide back up when it's clicked?
    I have a button inside a panel. I don't know how to send a command to a panel from the button in the panel to make it slide back up. So for now, that's the best solution I could think of.

  15. #15
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Found that it only works on widescreen. Info in OP.

  16. #16
    i've tried to created a similar mod based on yours and bard's buttons... it seems if i send a disconnect + reloadinterface game via one click my game crashes. is there any way to read the dump files?

  17. #17
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Quote Originally Posted by eNTi View Post
    i've tried to created a similar mod based on yours and bard's buttons... it seems if i send a disconnect + reloadinterface game via one click my game crashes. is there any way to read the dump files?
    I don't know how to read dump files, never used them.

    What exactly are you trying to do? I might be able to help.

  18. #18
    this:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <package>
        <panel color="invisible" x="158.5h" y="-69.0h" height="2.1h" width="2.1h" name="minimap_disconnect_quit" >
            <image texture="/ui/nqa/nqa_button.tga"/>
            <button
                texture="/ui/elements/button_roundhl.tga"
                onclick="Cmd('disconnect'); Cmd('reloadinterface game');"
                onrightclick="Cmd('quit');"
                interactive="false"
            />
        </panel>
    </package>
    did you find a way to make the button placement relative, so that the screen resolution / size doesn't matter?
    HoN on Arch Linux 64bit.

  19. #19
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Quote Originally Posted by eNTi View Post
    did you find a way to make the button placement relative, so that the screen resolution / size doesn't matter?
    No I did not. All I know is that you can do align="left/center/right" and valign="top/center/bottom" and then just add or remove from the y to move it and you would be a little more precise, but I don't know how do do relative other than that.

  20. #20
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    Bang HQ
    Posts
    1,168
    Quote Originally Posted by Jiggaboo View Post
    I would use this if you had it dropdown when a team concedes as well
    Would be a cool future feature
    Quote Originally Posted by MaxGhost View Post
    Yup... workin on it.
    This is going to be awesome, will download then.

    Clan [Bang] | 1750+ | High Skill Only | USA | Very Active Join Now

    See a post that breaks the rules? Use The Report Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •