Results 1 to 8 of 8
  1. #1
    MikeRaarupBirk's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    1,583
    Reputation
    38
    Thanks
    3,775
    My Mood
    Stressed

    [AS3/FSOD] Toggleable UI


    Requested by @DemonLives

    Make sure you have both as3, and fsod fully working.

    In this tutorial imma show you how to make the HP/MP bar toggleable (If you decide to use your brain, this exact tutorial can be used to other UIs, but different files):

    1) Head over to Parameters.as and put this:
    Code:
            setDefaultKey("ToggleUI", KeyCodes.UNSET);
            setDefault("onToggleUI", true);
    2) Head over to Options.as and put this under addGraphicOptions:
    Code:
    this.addOptionAndPosition((new KeyMapper("ToggleUI", "ToggleUI", "ToggleUI")));
    3) Head over to MapUserInput.as and put:
    Code:
                case Parameters.data_.ToggleUI:
                    Parameters.data_.onToggleUI = !(Parameters.data_.onToggleUI);
                    Parameters.save();
                    break;
    under:
    Code:
                case Parameters.data_.toggleCentering:
                    Parameters.data_.centerOnPlayer = !(Parameters.data_.centerOnPlayer);
                    Parameters.save();
                    break;
    4) Head over to StatsMetersView.as and put this under Public function update
    Code:
            if (!Parameters.data_.onToggleUI) {
                this.hpBar_.visible = false;
                this.mpBar_.visible = false;
            } else {
                this.hpBar_.visible = true;
                this.mpBar_.visible = true;
            }
    5) Rebuild the client, and it should work perfectly when you bind a key to your ToggleUI button, inside Options>Graphics.

    Image/Gif:



    https://i.gyazo.com/2d6f96555779a440...25b24260b4.mp4



    Last edited by MikeRaarupBirk; 02-27-2017 at 01:43 PM.

  2. The Following 2 Users Say Thank You to MikeRaarupBirk For This Useful Post:

    Demon (02-27-2017),wycuhmi (11-23-2018)

  3. #2
    Demon's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    Lost
    Posts
    1,095
    Reputation
    86
    Thanks
    316
    My Mood
    Angelic
    Thanks ;p, this will be very helpful for other use as well.
    Nice

  4. #3
    SeXZeFPS's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    In your wardrobe
    Posts
    598
    Reputation
    10
    Thanks
    637
    My Mood
    Asleep
    h ttps://gyazo.com/dd2ef7f60423c5e5c4924a8c92aa63d4

  5. #4
    Demon's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    Lost
    Posts
    1,095
    Reputation
    86
    Thanks
    316
    My Mood
    Angelic
    Quote Originally Posted by SeXZeFPS View Post
    h ttps://gyazo.com/dd2ef7f60423c5e5c4924a8c92aa63d4
    You need to add an import
    Nice

  6. #5
    lkdjnfoskjednfblksjdfn's Avatar
    Join Date
    Apr 2014
    Gender
    male
    Location
    127.0.0.1
    Posts
    1,340
    Reputation
    198
    Thanks
    841
    My Mood
    Inspired
    Nice!



    /10chars
    Last edited by lkdjnfoskjednfblksjdfn; 03-01-2017 at 02:50 PM.

  7. #6
    HeartJustice's Avatar
    Join Date
    Apr 2018
    Gender
    male
    Posts
    74
    Reputation
    10
    Thanks
    16
    For people having trouble with this, add this to the imports at the top:

    Code:
    import com.company.assembleegameclient.parameters.Parameters;

  8. #7
    SeXZeFPS's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    In your wardrobe
    Posts
    598
    Reputation
    10
    Thanks
    637
    My Mood
    Asleep
    Quote Originally Posted by HeartJustice View Post
    For people having trouble with this, add this to the imports at the top:

    Code:
    import com.company.assembleegameclient.parameters.Parameters;
    xd, that bump

  9. #8
    HeartJustice's Avatar
    Join Date
    Apr 2018
    Gender
    male
    Posts
    74
    Reputation
    10
    Thanks
    16
    Quote Originally Posted by SeXZeFPS View Post
    xd, that bump
    I'm sorry, but a lot of my friends having error. They all asking me every time, so I just post it here.

    - - - Updated - - -

    Quote Originally Posted by MikeRaarupBirk View Post

    Requested by @DemonLives

    Make sure you have both as3, and fsod fully working.

    In this tutorial imma show you how to make the HP/MP bar toggleable (If you decide to use your brain, this exact tutorial can be used to other UIs, but different files):

    1) Head over to Parameters.as and put this:
    Code:
            setDefaultKey("ToggleUI", KeyCodes.UNSET);
            setDefault("onToggleUI", true);
    2) Head over to Options.as and put this under addGraphicOptions:
    Code:
    this.addOptionAndPosition((new KeyMapper("ToggleUI", "ToggleUI", "ToggleUI")));
    3) Head over to MapUserInput.as and put:
    Code:
                case Parameters.data_.ToggleUI:
                    Parameters.data_.onToggleUI = !(Parameters.data_.onToggleUI);
                    Parameters.save();
                    break;
    under:
    Code:
                case Parameters.data_.toggleCentering:
                    Parameters.data_.centerOnPlayer = !(Parameters.data_.centerOnPlayer);
                    Parameters.save();
                    break;
    4) Head over to StatsMetersView.as and put this under Public function update
    Code:
            if (!Parameters.data_.onToggleUI) {
                this.hpBar_.visible = false;
                this.mpBar_.visible = false;
            } else {
                this.hpBar_.visible = true;
                this.mpBar_.visible = true;
            }
    5) Rebuild the client, and it should work perfectly when you bind a key to your ToggleUI button, inside Options>Graphics.

    Image/Gif:



    https://i.gyazo.com/2d6f96555779a440...25b24260b4.mp4



    Mike, you make soon tutorial on how to hide players like in Crazy Client?

Similar Threads

  1. [AS3 FSOD] How to add a new sprite sheet
    By MikeRaarupBirk in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 20
    Last Post: 07-29-2020, 10:07 PM
  2. [AS3/FSOD] Change the color of your chat.
    By MikeRaarupBirk in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 15
    Last Post: 03-11-2017, 07:04 AM
  3. [Solved] [AS3 FSOD] Hatching any eggs = HP Pots?
    By 9Gold in forum Realm of the Mad God Private Servers Help
    Replies: 8
    Last Post: 11-21-2016, 12:50 PM
  4. [Solved] [AS3/FSoD] Adding Flex SDK to IntelliJ
    By SwitchBot in forum Realm of the Mad God Private Servers Help
    Replies: 13
    Last Post: 10-08-2016, 10:51 PM
  5. [AS3] FSOD Client
    By HGAEHaeheadhetdhtertherh in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 52
    Last Post: 06-13-2016, 12:38 PM