• 0

    posted a message on Strange sort of aliassing going on...

    I know this is a bit of a late response but:

    To fix this, press Ctrl+T or View -> Show Terrain -> Show Hidden Terrain Cells

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on Camera mouse relative mode permanently hides mouse cursor

    Hello, I have found an interesting bug regarding the camera mouse relative mode permanently hiding the mouse cursor.

    If you apply the "Camera - Lock camera mouse relative mode On for player #" coupled with "General - Wait" statement, it will hide the mouse cursor indefinitely for the player. There is no way to get the mouse cursor back and it remains hidden even if you exit the map; you must shut down and restart the application. Turning the "Lock mouse relative mode Off" or using "Show Mouse Cursor" will not bring back the cursor.

    The following will work.

        Events
            Game - Map initialization
        Local Variables
        Conditions
        Actions
            Camera - Lock camera mouse relative mode On for player 1
            Camera - Lock camera mouse relative mode Off for player 1
    

    The following will not work.

        Events
            Game - Map initialization
        Local Variables
        Conditions
        Actions
            Camera - Lock camera mouse relative mode On for player 1
            General - Wait 0.1 Game Time seconds
            Camera - Lock camera mouse relative mode Off for player 1
    

    EDIT: This also locks the Camera.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on [Library] getResolution

    getResolution v1.20

    About

    This library obtains the player's resolution, UI resolution, and scale value with a mouseclick.

    Changelog

    New from v1.10

    • Works better on battle.net (No longer have to ask the player to hold while clicking)
    • Screen flips due to the validation trigger removed
    • Able to check if the player's resolution has changed with the use of a dialog
    • Incorrect numbers clicking while moving the mouse fixed

    New from v1.00

    • Will now work with ANY resolution
    • Retrieves the player's UI screen size (Essential for creating dialogs)
    • Now works in Windowed Mode
    • Nearly half the size of v1.00 (5.30KB compressed)
    • Ability to check resolution to ensure its validity
    • Able to initiate the system for individual players
    • No longer required to enter Camera bounds

    How to use

    There are two functions that can be used:

    • Player Resolution, UI Resolution, Scale Value

    Use this function to initiate the system and obtain the selected player's resolution information.

    InitializationGrammar

    • Check Resolution

    Use this function to check if the player's resolution has changed. It will display an invisible dialog button at the location of their mouse relative to the UI resolution of what it has stored. If the mouse does not enter the dialog then the resolution has been changed. The system will then be reinitialized for that player.

    Check Resolution Grammar

    Creating Dialogs/Screen objects

    After the system has been initiated for the selected player, the information obtained will be stored in three variables:

    • getResolution_PlayerResolution[15][1]
    • getResolution_PlayerUIResolution[15][1]
    • getResolution_PlayerScaleValue[15]

    The first dimension of the arrays are the player's number (0-15). The second dimension of the resolution variables are the Width(0) and Height(1).

    When creating dialog or screen objects, you use the PlayerUIResolution variable. You multiply this variable from a range of 0 to 1. 1 being 100%. Here is an example dialog that takes up 25% of the player's screen.

    Example Dialog Setup

    If the player's UI resolution were 1600x1200, then the above example dialog would translate to:

    Set size of ExampleDialog to ((1600 * .5),(1200 * .5))
    

    which is 25%.

    With this, you can setup dialogs to be exact sizes and at exact positions on the player's screen. Example Dialogs in-game

    Debug

    Here is with debugging enabled:

    Debug

    Download

    Library

    http://www.sc2mapster.com/media/files/543/832/getResolutionv120_GUI.SC2Lib

    Map

    http://www.sc2mapster.com/media/files/543/831/getResolution_v1.20_GUI.SC2Map

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on assign comparsion operator to a variable?

    Is there a way to assign a comparison operator to a variable? I tried creating a variable of 'Preset - Any Comparison Operator' but it only has the '==' and '!=' operators both of which result in syntax errors if assigned to the variable.

    I then noticed Integers have a huge list of presets including all of the comparison and arithmetic operators but unfortunately result in syntax errors if used.

    So, Is there any other way or do we just have to wait for Blizz to fix?

    Thanks.

    Posted in: Triggers
  • 0

    posted a message on Is there an image that shows the dialog "grid"

    @ResolveHK: Go

    It completely depends on the players resolution and their aspect ratio. For each aspect ratio, there is a set UI size. From there, the player's resolution is divided by the aspect ratio's UI size to determine what value to scale down the dialogs. Take a look at my tutorial: http://forums.sc2mapster.com/resources/tutorials/16364-trigger-how-to-find-actual-size-of-a-dialog-in-game/

    So, if the player's resolution is 1680x1050 and you create a dialog of size 512x384 then its actual size in-game for that player would be:

    (1680/1900) * dialogWidth = 448

    (1050/1200) * dialogHeight = 336

    This also applies to Offsets.

    Posted in: Triggers
  • 0

    posted a message on editor math is wrong

    Well I think I got it as close as its going to get.

            Variable - Set test[0] = (121.9048 * 0.0082)                                  // 1.01172
            Variable - Set test[1] = (((121.9048 * 1024.0) * (0.0082 * 1024.0)) / 1024.0) // 12.1907
            Variable - Set test[3] = (test[1] - (test[0] / 1024.0))                       // .999815, but it rounds up to 1
    

    So, I am off by .00049.

    Posted in: Triggers
  • 0

    posted a message on editor math is wrong

    @dgh64: Go

    Hm, I tried:

            Variable - Set test[0] = (((121.9048 * 4096.0) * (0.0082 * 4096.0)) / (4096.0 ^ 2.0))
    

    But, in-game, it says cannot divide by 0. When I input in my calculator, I get the correct number, .99961936.

    Edit: Ah, because 4096^2 > 524288 (max size for real)

    So, I tried:

            Variable - Set test[0] = (((121.9048 * 4096.0) * (0.0082 * 4096.0)) / 4096.0)
            Variable - Set test[1] = (test[0] / 4096.0)
    

    and got value: .0117188

    Posted in: Triggers
  • 0

    posted a message on editor math is wrong

    Hello,

    Does anybody know of any tricks to make the editor math for reals more accurate? I need precise numbers and the editor is giving me numbers that are too inaccurate. For example:

            Variable - Set test[0] = (121.9048 * 0.0082)
    

    The editor returns 1.01172 which is incorrect. The number should be .99961936. I know that it isn't possible for it to be that accurate due to the editor using fixed points and not floats, but I would like to get it to at least .99~

    I read from another post to multiply both numbers by 4096 and then divide by 4096 but the returned value was, 48.7627, which is obviously way too large.

            Variable - Set test[1] = (((121.9048 * 4096.0) * (0.0082 * 4096.0)) / 4096.0)
    

    So, how can I improve accuracy? Thanks.

    Posted in: Triggers
  • 0

    posted a message on What is the trigger memory cap?

    @s3rius: Go

    Thanks.

    Posted in: Triggers
  • 0

    posted a message on What is the trigger memory cap?

    Hello,

    What is the current memory cap for triggers? Is the cap for uncompressed or compressed?

    Thanks.

    Posted in: Triggers
  • 0

    posted a message on clicked dialog button returns (0,0) UI coords

    (removed)

    Posted in: Triggers
  • 0

    posted a message on clicked dialog button returns (0,0) UI coords

    @s3rius: Go

    I know. But, how would you retrieve the UI coordinates of the image bounds if it is different at each resolution? As far as I know, there is no way to retrieve in-game values of a dialog from a player's perspective.

    Posted in: Triggers
  • 0

    posted a message on clicked dialog button returns (0,0) UI coords

    @s3rius: Go

    To check to see if the mouse position is in the image bounds, I have to get the world coordinates of the mouse click relative to the dialog box?

    Posted in: Triggers
  • 0

    posted a message on clicked dialog button returns (0,0) UI coords

    @s3rius: Go

    There is problem with that though. How do you know if they user has clicked on the image compared to just clicking randomly on the screen? There are no events/conditions to use for this scenario to fire a trigger except "If user clicks mouse". You cannot use a dialog image with a "dialog item is used" event or "used dialog item" condition. I thank you for helping me though. I think I'm just going to wait until patch 1.2 and see how the real-time mouse tracking goes. If that mouse tracking does record GUI-coordinates then what I'll do is create an array of size 10 that records the coordinates every .1 seconds and when the user clicks on the button and it returns (0,0), the 'fired' trigger will just cycle through the array for last known greater than 0 coordinates and use that. That would work.

    Posted in: Triggers
  • 0

    posted a message on clicked dialog button returns (0,0) UI coords

    @s3rius: Go

    Quote from s3rius: Go

    I think the closest you can get it grabbing the x/y positions of the clicked button.

    Or if you really want that button and the exact x/y position then you can place a dialog image above the button and make it transparent. You will then click on the dialog image (because the button is stuck underneath it) and this returns valid X/Y coordinates and triggers the UI click event (which you have to use then).

    Sorry to re-bump this thread but I tried this and it doesn't return any values unless I'm doing something wrong.

    Set up Dialog, button, image

        Events
            Game - Map initialization
        Local Variables
        Conditions
        Actions
            ------- Dialog
            Dialog - Create a Modal dialog of size (256, 256) at (0, 0) relative to Center of screen
            Variable - Set dialog = (Last created dialog)
            ------- Button
            Dialog - Create a button for dialog dialog with the dimensions (128, 128) anchored to Center with an offset of (0, 0) setting the tooltip to "" with button text "Button" and the hover image set to ""
            Variable - Set button = (Last created dialog item)
            Dialog - Set (Last created dialog item) Render Priority to 0 for (All players)
            ------- Image
            Dialog - Create an image for dialog (Last created dialog) with the dimensions (128, 128) anchored to Center with an offset of (0, 0) setting the tooltip to "" using the image Assets\Textures\white32.dds as a Normal type with tiled set to true tint color White and blend mode Alpha
            Variable - Set image = (Last created dialog item)
            Dialog - Set (Last created dialog item) Render Priority to 512 for (All players)
            ------- Show all
            Dialog - Show dialog for (All players)
            Dialog - Show button for (All players)
            Dialog - Show image for (All players)
    

    If player clicks mouse

        Events
            UI - Player Any Player clicks Any mouse button Down.
        Local Variables
            x = 0 <Integer>
            y = 0 <Integer>
        Conditions
        Actions
            Variable - Set x = ((Integer((Mouse X position clicked in the world))) - (X offset of dialog))
            Variable - Set y = ((Integer((Mouse Y position clicked in the world))) - (Y offset of dialog))
    
    Posted in: Triggers
  • To post a comment, please or register a new account.