1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Hide buttons

Discussion in 'Triggers & Scripts' started by Strydhaizer, Sep 8, 2019.

  1. Strydhaizer

    Strydhaizer

    Joined:
    Feb 28, 2013
    Messages:
    1,480
    Resources:
    4
    Models:
    1
    Maps:
    1
    Template:
    2
    Resources:
    4
    Please ignore this thread, I already fixed all of it :D.

    Question #1

    Hey guys, I just want to ask how do I remove this part? I thought that was part of the minimap but I already managed to remove the minimap but the buttons is still there.

    upload_2019-9-8_19-20-39.png

    ---
    Question #2

    Hello guys. I'm trying to make command buttons disappear with the new natives. Currently I don't know what should I do to make command buttons completely disappear from the view. I read that it will keep reappearing everytime you command a unit.

    • I have to put wait because it doesn't work when the command buttons reappear and you make it disappear at the same time.

    • Untitled Trigger 001
      • Events
        • Unit - A unit owned by Player 1 (Red) Is issued an order targeting an object
        • Unit - A unit owned by Player 1 (Red) Is issued an order targeting a point
        • Unit - A unit owned by Player 1 (Red) Is issued an order with no target
      • Conditions
      • Actions
        • Wait 0.01 seconds
        • Set Frame_CountTemp = 0
        • For each (Integer A) from 0 to 11, do (Actions)
          • Loop - Actions
            • Custom script: call BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_COMMAND_BUTTON,udg_Frame_CountTemp), false)
            • Set Frame_CountTemp = (Frame_CountTemp + 1)


    • Untitled Trigger 001
      • Events
        • Time - Every 0.01 seconds of game time
      • Conditions
      • Actions
        • Set Frame_CountTemp = 0
        • For each (Integer A) from 0 to 11, do (Actions)
          • Loop - Actions
            • Custom script: call BlzFrameSetVisible(BlzGetOriginFrame(ORIGIN_FRAME_COMMAND_BUTTON,udg_Frame_CountTemp), false)
            • Set Frame_CountTemp = (Frame_CountTemp + 1)

    Edit: I fixed it by doing this instead, hopefully this is not a bad practice.

    • For each (Integer A) from 0 to 11, do (Actions)
      • Loop - Actions
        • Custom script: call BlzFrameSetAbsPoint(BlzGetOriginFrame(ORIGIN_FRAME_COMMAND_BUTTON,udg_Frame_CountTemp), FRAMEPOINT_RIGHT, 100, 100)
        • Set Frame_CountTemp = (Frame_CountTemp + 1)
     

    Attached Files:

    Last edited: Sep 8, 2019
  2. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,100
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Why are you using Frame_CountTemp? That's pointless. Literally just use the integer A loop.
     
  3. Strydhaizer

    Strydhaizer

    Joined:
    Feb 28, 2013
    Messages:
    1,480
    Resources:
    4
    Models:
    1
    Maps:
    1
    Template:
    2
    Resources:
    4
    It's just a test don't worry about it. I forgot what's Integer A in JASS. :D
     
  4. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    2,905
    Resources:
    1
    Spells:
    1
    Resources:
    1
    You can always convert a trigger to see what it uses....