• 0

    posted a message on Making you able to see other players 'vision box'.

    As you mentioned it's a feature of Co-op, so easiest way to approach this is to look up how Blizzard did it. All of Co-op maps are based on AlliedCommanders.SC2Mod. If you open that mod in editor, then go to triggers and navigate to UI Coop -> Mission - Minimap Ally Frustrum you'll find what you need. Snapshot: http://peeeq.de/gui.php?id=3872

    Basically this feature is built on top of 2 triggers.

    • Init trigger that creates Minimap Ping for each player using PingViewArea model (this is basically the frame of vision box you mention). Model is then scaled to match size of the map.
    • Periodic trigger which is fired by event Players moves the camera. Each time it updates the position of Minimap Ping.

    Players moves the camera event requires to provide id of the player, so you must create that trigger for each possible player.
    Also, when player leaves the game you should remove his Minimap Ping (that's something Co-op mode doesn't do IIRC).

    Posted in: Triggers
  • 0

    posted a message on [Third Person RPG] Transformers: Open World (Cancelled)

    That sucks man, i've been following this project.

    Ditching all the assets made so far would be a waste. What about just reworking hero models to not remind the robots from original movie, plus obviously name change. Wouldn't that be enough? They cannot claim copyrights on game that uses concept of turning cars into robots, can they?

    Quote:

    (Suggestion: Go with the Warcraft Universe)

    That sounds great. I would like to propose the name - World of Warcr.. oh wait. We already have it.
    IMO stick to sci-fi.

    Posted in: Project Workplace
  • 0

    posted a message on Listening to Hooked Custom Buttons, failing hard :(

    I was about to answer that i faced the same problem and couldn't make it work. That is - buttons defined inside panel template didn't fire the trigger. In the end i resorted to creating buttons one by one. (I was still creating them from template though).

    It's interesting that you made it work in the end, without doing anything specific. I guess i'll give it another chance at the next occasion.

    Posted in: UI Development
  • 0

    posted a message on Non-english strings?

    You cannot put special characters into galaxy script (unless it's a part of comment) that's correct, and it has nothing to do with system configuration, nor editor configuration. It's a lexer issue which is apparently not capable of handling multibyte characters.

    Quote:

    Lol, I think texts comparisons are only for checking pointers and not stored values.

    Yes, text comparisions always return true. Even if you compare some initialized Text variable against null. I'd expect them to at least compare pointers - whether it is the same Text instance, but it seems to not even do that. Yet, it is a totally meant behaviour, otherwise it could lead to desyncing of the games, due to different localizations.

    As for the solution, i've did some testing and it is possible to escape multibyte characters inside string instance. For example this "명" can be stored as "\xEB\xAA\x85" (EB AA 85 in utf8). Here is the site where you can easly convert characters to their UTF8 representation - https://r12a.github.io/apps/conversion/

    My snippet of the code i was doing tests on:

    static void print(string s) {
        UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, StringToText(s));
    }
    
    void gameInit() {
        TriggerAddEventChatMessage(TriggerCreate("onMessage"), c_playerAny, "-", false);
    }
    
    bool onMessage(bool testConds, bool runActions) {
        string msg;
    
        // strip leading "-"
        msg = StringSub(EventChatMessage(false), 2, StringLength(EventChatMessage(false)));
    
        if (msg == "\xEB\xAA\x85\xEB\xA0\xB9") { // -명령
            print("recognized command 1");
        }
    
        return true;
    }
    
    Posted in: Galaxy Scripting
  • 0

    posted a message on So are there no mods, or do they just not care about spam?

    Haha, hiring people to fight the spam bots on their rights. That's hilarious :D

    Back to the problem - some people suggested captcha, it would most likely not solve the problem as captcha solving services are common and quite cheap those days (for example http://deathbycaptcha.com/ ).

    I agree though, there are many ways to fight the bots. Usually for a small forum like this simple change in the registration form is efficient until bot will be adapted again. Like adding custom field. Or even better - embedding some javascript code which execution is required to produce validate form. And BOOM HEADSHOT - all bots are down as they are not capable of executing JS code (at least the vast majority of them).

    Posted in: Off-Topic
  • 0

    posted a message on [Solved] Adding text to custom tooltip

    Did some testing and you are right, custom tooltip indeed doesn't inherits text from the control that had triggered it. It appears to work only for default tooltips, i suspect that behaviour might be controlled by some property that could also be set for custom tooltips, or it's internally handled by SC2..

    Tooltip frame by default has 2 childs. "BackgroundImage" and "Label". It's probably created from the StandardTooltip template that looks like this:

    <Frame type="StandardTooltip" name="StandardTooltip">
        <MaxWidth val="480"/>
        <Insets top="15" left="15" bottom="15" right="15"/>
        
        <Frame type="Image" name="BackgroundImage" template="StandardTemplates/StandardBorderTooltipGame">
            <Anchor relative="$parent"/>
        </Frame>
    
        <Frame type="Label" name="Label">
            <Style val="@@StandardTooltip"/>
            <Anchor side="Top" relative="$parent" pos="Min" offset="15"/>
            <Anchor side="Left" relative="$parent" pos="Min" offset="15"/>
            <Width val="450"/>
        </Frame>
    </Frame>
    

    So you must hook the label item within created custom tooltip and set text for it. Tested and works for me: http://peeeq.de/gui.php?id=3798
    Relevant part:

    Dialog - Hook up an existing Label called "Label" in dialog item customTooltip
    Dialog - Set (Last created dialog item) text to "actual tooltip content" for (All players)
    

    EDIT:
    One more thing worth to mention is that custom tooltip didin't show up for me until i've set the "tooltip text" property within the label that is supposed to trigger it, even though the text i set there isn't even displayed....

    EDIT2:
    Ah i know why it didin't display without setting the tooltip text for label that is supposed to trigger the tooltip. Cause i had "accept mouse" flag set to false, and apparently setting "tooltip text" property forces it to be true. I noticed you already have it in your snippet though.

    Posted in: Triggers
  • 0

    posted a message on [Solved] Adding text to custom tooltip

    AFAIK you are not supposed to set tooltip text directly within the tooltip dialog item, as tooltip inherits its text from the dialog item that had triggered it.
    What i want to say is that tooltips are pretty much just containers. One tooltip can serve many dialog items printing different texts.

    So try to set tooltip text on the label, not on the tooltip itself.

    Posted in: Triggers
  • 0

    posted a message on Trigger debugging window in online games / replays

    @ArcaneDurandel: Go

    That's exactly what i had hoped to hear. Thanks, it works.

    Posted in: Triggers
  • 0

    posted a message on Trigger debugging window in online games / replays

    Before patch 3.0 i was able to launch trigger debugging window for online games and replays (by launching sc2 with -trigdebug flag). It sometimes proven itself useful for tracking issues that weren't happening in single player during offline tests. Even though its use was limited - you weren't able to put any breakpoints in the code etc.

    I just tried to do the same now.. and it seems to no longer work.. did blizzard disable it? If so, that's a big shame...

    Posted in: Triggers
  • 0

    posted a message on Sublime Text plugin

    @TTay24: Go

    Linter is separated to another package, called nectan which requires python to work. Did you install it as it's mentioned in README?

    If you have it installed and it still doesn't work, check whether it got correctly added to your PATH. Linter should by accessible from cli by calling

    galaxylint --file filename.galaxy
    
    Posted in: Galaxy Scripting
  • 0

    posted a message on How to enable new ping system from patch 3.0

    Patch 3.0 introduced new ping system. Which was mainly targeted for meelee games, but i wannna add it to custom arcade game. I noticed that some old arcade maps have it enabled, some doesn't.. it feels quite random. I assume there must be somewhere data field that controls whether it is on/off. So where's that thing?

    Posted in: Data
  • 0

    posted a message on 2D Game Lib

    Wow, this looks pretty neat.

    Is the demo published on bnet by any chance? I would like to see how responsive controlling is, in an online game.

    Posted in: Project Workplace
  • 0

    posted a message on [Blender] How to create an animated coin model for Starcraft 2 with Blender

    Why are you using such an old version of blender? 2.63 is almost 4 years old.. and apparently not compatible with m3addon.
    Just get the most recent version and it will work.

    Posted in: Tutorials
  • 0

    posted a message on Issues rendering minimap above custom dialog

    Uh. Actually i was addressing completely other issue than you've described. So you can forget about the above - my bad there.

    The problem is within the image you are using. It's filled with that blue overlay and kind of enforces it. While most of the border image don't have any filling. I'm not sure if you can workaround it somehow, without editing the image itself.

    Posted in: Triggers
  • 0

    posted a message on Issues rendering minimap above custom dialog

    @ZMilla93: Go

    The source of issue comes from "Create dialog item" - it creates the dialog within the global container (that's my guess since i can't see that part in your triggers). You want to create that border image within the MinimapPanel container.

    If you wish to stick to triggers, the following should work:

    Hook the UIContainer/ConsoleUIContainer/MinimapPanel panel and create border image within it as a child dialog. The rest goes the same, just remove the layer swaping to HDR - that's a workaround you don't need here.
    http://peeeq.de/gui.php?id=3771

    I love ice escapes. I look forward to your creation :D

    Posted in: Triggers
  • To post a comment, please or register a new account.