• 0

    posted a message on They have fixed "CValidatorLocationCrossCliff" in 1.3.3 PTR

    And its undocumented.

    In previous builds, this Validator will crash the game.

    Posted in: General Chat
  • 0

    posted a message on A trigger to detect any ability used by any unit?
        Events
            Game - Map initialization
        Local Variables
            i = 0 <Integer>
        Conditions
        Actions
            General - For each integer i from 0 to 30 with increment 1, do (Actions)
                Actions
                    General - Custom Script:     TriggerAddEventUnitAbility(gt_Test, null, AbilityCommand("", lv_i), -1, false);
    

    This will register all unit using all ability commands at all stage for the trigger "Test".

    Posted in: Triggers
  • 0

    posted a message on 1.3.0 PTR new bug - EditBox lost focus when input

    This bug got fixed in 1.3.0 PTR Patch 2

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on [Tutorial, Trigger, Data]Show/Hide/Destroy Any Given Actor For Specified Players Only
    Quote from Abion47: Go

    Could you use this to create multiplayer first person games? So you can hide a unit from it's controller, but everyone else can still see it?

    Absolutely, you can. It's the most basicly usage of these function.

    Posted in: Tutorials
  • 0

    posted a message on [Tutorial, Trigger, Data]Show/Hide/Destroy Any Given Actor For Specified Players Only
    Quote from dra6o0n: Go

    You mean like a narrative game for four players, but each player's experiences are script based on each character, so it narrates differently to each character like with individual cutscenes or "visions"?

    P1 could play as a warrior who comes from a mercenary background, thus sees the character "think" in his head when activating certain sequences. P2 can be a royalty wizard, etc. and sees different text and quotes.

    All characters can see chat boxes of other characters when a cutscene or sequence involves them.

    Kind of like a Semi-Open RPG with storytelling in it.

    Better is if players can interact with other players ala "Choice selections" like a player raids another player's town, initiates a "talking sequence" and both player takes turns talking and using the pre-listed story basically.

    Think Fallout talk dialogs, but between players.

    Absolutely you can

    Posted in: Tutorials
  • 0

    posted a message on [Tutorial, Trigger, Data]Show/Hide/Destroy Any Given Actor For Specified Players Only
    Quote from Sneakervek: Go

    So with this could we create a method to hide all the actors in a "zone" in a first person map to improve frame rates? Or would the cost of hiding them all not be efficient?

    Of course you can. But if we want to hide many actors in the same time, we doesn't need to do reconfig the flyer helper setting for every actors. We just need set it once, and send the asynchronous message to all actors, than reset it.

    I plan to do a new custom function could send asynchronous actor message to actos in a region at once for specified players , which could have much more highrt efficiency than just loop-using "Show/Hide Actor For Player Group" for every actors in a region.

    Posted in: Tutorials
  • 0

    posted a message on [Tutorial, Trigger, Data]Show/Hide/Destroy Any Given Actor For Specified Players Only
    Quote from M0rt1mer: Go

    Don't forget about the Selection Update event, it has a asynchronous version, which also could be used for a workaround.

    That's right, but that needs a selectable Unit. And using triggers to save\modify\restore every player's selection.

    And there is an other potential problem: modify selection with trigger will throw the selection events to the galaxy, if users of this custom functions doesn't careful, it could accidently triggered their own triggers in their map.The flyer helper will be more universally, and has much better efficiency.

    Not saying you can't do it, anyway

    Posted in: Tutorials
  • 0

    posted a message on [Tutorial, Trigger, Data]Show/Hide/Destroy Any Given Actor For Specified Players Only
    Quote from iWaNN: Go

    Thank you! This is great trigger! I want it for my map, but... it's very strange... this function is not work in my map. I'm copy/paste it from original map.

    Function:

    Trigger:

    I'm select one unit and press Delete button... nothing happens :( Map with this trigger in attachmet.

    You forgot to copy the actor. Copy the "TriggerPerPlayerActorAgent" to your map, it's all done.

    Its the only actor you need to manipulate ALL actors asynchronously.

    Posted in: Tutorials
  • 0

    posted a message on [Tutorial, Trigger, Data]Show/Hide/Destroy Any Given Actor For Specified Players Only

    Not sure my poor english has made it clear.

    But "reconfig Player 1 game setting" and "modify upgrades for Player 1" are two completely different things.

    They both called "Player 1", but the the former one is actully refers to P1's machine, and the later one is P1's player dataes

    The later will affect every player's machine, tell them"hi, I just made a upgrade, and my marine have addtional HP now, haha.!" or something. The game need syn these datas to ensure its progress.

    Image if the marine on your machine have 100 atk dmg, but on others' machine it only has 6, when he attack a target with 10 HP, the target should die or live? The game would not allow such things to happen, or the fairness will be ruined, so these data are forced to synchronous. If there any data differences in two machine, the game will forced to disconnect.

    Posted in: Tutorials
  • 0

    posted a message on [Tutorial, Trigger, Data]Show/Hide/Destroy Any Given Actor For Specified Players Only
    Quote from Rushhour: Go

    Nice. I only tested the filter and thought it was impossible to show a unit to only one player and hide it to all other allies or foes. :D

    But now that I think of it. Wouldn't it be easier to make a fake upgrade. Create a validator which checks for this upgrade and use this validator in the actor term? Upgrades can more easily be modified in the triggers than this flyer helper state.

    No, this cannot be done. Upgrades actually are not asynchronous. Every machine actually save all player's data table,and keep contact with each other. That's why when you upgraded marine's shield, just your units have shield, other player's units display in your machine doesn't have; And other players see the same things on their machine that just your marine have this upgrade, it's absolutely synchronous.

    You can't just modify the upgrades just for your machine, it will certainly disconnect the game.

    Posted in: Tutorials
  • 0

    posted a message on [Tutorial, Trigger, Data]Show/Hide/Destroy Any Given Actor For Specified Players Only

    Attachment #1 is A screenshoot from Player 1

    Attachment #2 is A screenshoot from Player 2

    Can you tell the difference?

    Posted in: Tutorials
  • 0

    posted a message on [Tutorial, Trigger, Data]Show/Hide/Destroy Any Given Actor For Specified Players Only

    My english is kind of limited, so I will make it simple. If you have any questions, you can post it here.

    It's a tutorial that teach you how to do asynchronous actor operate with triggers and Data Editor, like show/hide/destroy any actor for specified players only, or send even more actor messages asynchronously. And there will also be a sample map with two custom funcions "Show/Hide Actor For Player Group" and "Destroy Actor For Player Group".

    With this, you can make different player see/hear different things(including actor of Units, Doodads, Sounds, Effects, Models, Texts, Splats, and even Terrain Deformations)in the same location.

    If you are familiar with the "Phase" tech in WOW, it would be more understandable.

    In fact the Actor system itself is asynchronous. An actor might only be created on machines with good graphics cards or with high game video setting, for instance. This won't make they disconnect, even if two players see different actors, because the actors only affect visual effect and sounds.

    But so far, the editor doesn't have supports to send per player actor message, or show/hide any actors for specified players.(We have a "Actor-Filter" field but it only works for Effect scope, and the filter is very limited). So we need to find a especial way to do it:

    First Leap

    First, though we can't send actor message for specified player only, the "actor terms" in actor events still allow us to check the video options(Low <-> Extreme) of local machine. If we can use triggers to reconfig these options for specified players at run time, and write actor events to check their value, then we can make it.

    Sure, most of the video setting can't be reconfiged by triggers. But we've got lucky, there is one, and just one game setting can be reconfiged by galaxy, and can be checked by actor terms in the meantime - the "Show Flyer Help" setting.

    There is a trigger action: "Lock Flyer Helper Display" allow us temporary set the display style of Flyer Helpers(All, None, Selected.), and an other action: "Unlock Flyer Helper Display" to turn the flyer helper back to player's setting.

    So our first conception would be like this: Say if we want to hide an actor for Player 1, we use triggers to lock player 1's flyer helper to "All", and set other player's setting to "None", then use "Send Actor Message" action to send a actor signal to our actor, then unlock the settings of all players. And we modfiy the actor in actor editor, create an actor event that capture this signal, then check the flyer helper settings of local machine with actor terms, if the setting is "All", then send message "SetVisibility" to hide itself.

    The actor event will like:

    <On Terms="Signal.*.Hide; FlyerHelper All" Send="SetVisibility"/>
    

    If you want to improve your actor skill, you can test it yourself, but I'll tell you the result: it works! This will hide the actor for Player 1 only. But we still in the half-way.

    A Second Leap

    The test above provide us a excellent information: Per Player Actor Message is possible.

    But it needs you to modify the actor, add a few actor events. What we most wanted is to show/hide ANY actor we want by specified players. If we want to do it this way, we will need to modfiy almost ALL actors in actor editor. Even if we have CActorEventMacro, it's still not a option.

    We need a simple way, a universal way.

    Unfortunately, we just can't use triggers to dynamic add actor events for an actor at runtime, or use trigger function to send actor message with actor term.(I really hope blizzard counld add these features in the feature)

    It's a dead end then?

    No. There is an other path we can choose. We need to thank the Aliases system and the References system in the actor system :)

    In the actor editor, we not only can check terms in actor events, but also can make actors send actor messages to other actors with the "Target" field of the messages. We only need one custom agent actor if we can make it check actor terms then send messages to the actor we want to operate.

    CActorSimple is enough for such a custom agent actor. And you can fill the "Target" field with explicit Actor IDs or Aliases or References.

    So our second conception would be like this: We use triggers lock the flyer helper setting, then send "Create xxxx"(xxxx be the id of the agent actor) message to our target actor, tell it to create a agent actor. Then we immediately use the function "Actor From Actor" with the System References "::LastCreatedActual" to get a hold of the created agent, send a signal to the agent, then destroy the agent, release the flyer helper setting. And in actor editor, we create the agent actor with CActorSimple, capture the signal, and fill the Target fields of it's corresponding messages with System References "::Creator", if that would work, it's done.

    But it won't. There is a strange bug here: If you using the trigger action "Send Actor Message" to send "Create" message, the created actor won't set it's "::Creator" References to the Creator, thus, the messages won't reach the target actor - One last obstacle to get through.

    And it is easy to do. We just set this System References manually with trigger actor messages. Or we could use Aliases instead, they both work. If we use Aliases, we just need change the target field to the aliase we set.

    Sample funtions to Show/Hide given Actors for given Players

    In the end, I will give you a sample map with two custom funcions "Show/Hide Actor For Player Group" and "Destroy Actor For Player Group".

    In these two sample functions, I use "AliasAdd" message to add custom alias "_TriggerTarget" to the target actor, then remove the alias with "AliasRemove" when its done. The alias is just here to help the agent actor "TriggerPerPlayerActorAgent" to find the target actor.

    The detail of the funtion "Show/Hide Actor For Player Group".

    Show/Hide Actor For Player Group
        Options: Action
        Return Type: (None)
        Parameters
            Players = (Active Players) <Player Group>
            Actor <Actor>
            Show = Show <Show/Hide Option>
        Grammar Text: Show Actor For Players
        Hint Text: (None)
        Custom Script Code
        Local Variables
            Agent = No Actor <Actor>
            OtherPlayers = (Active Players) <Player Group>
        Actions
            Player Group - Remove all players in Players from OtherPlayers
            UI - Lock flyer helper display for players in Players to All
            UI - Lock flyer helper display for players in OtherPlayers to None
            Actor - Send message "Create TriggerPerPlayerActorAgent" to actor Actor
            Variable - Set Agent = (Actor connected to Actor via reference "::LastCreatedActual")
            Actor - Send message "AliasAdd _TriggerTarget" to actor Actor
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Show == Show
                Then
                    Actor - Send message "Signal Show" to actor Agent
                Else
                    Actor - Send message "Signal Hide" to actor Agent
            Actor - Send message "AliasRemove _TriggerTarget" to actor Actor
            Actor - Send message "Destroy" to actor Agent
            UI - Unlock flyer helper display for players in (All players)
    

    The function "Destroy Actor For Player Group" is basiclly the same, just have different parameters, and send different signals.

    Destroy Actor For Player Group
        Options: Action
        Return Type: (None)
        Parameters
            Players = (Active Players) <Player Group>
            Actor <Actor>
            Immediate = Off <On/Off Option>
        Grammar Text: Destroy Actor For Players with Immediate Immediate
        Hint Text: (None)
        Custom Script Code
        Local Variables
            Agent = No Actor <Actor>
            OtherPlayers = (Active Players) <Player Group>
        Actions
            Player Group - Remove all players in Players from OtherPlayers
            UI - Lock flyer helper display for players in Players to All
            UI - Lock flyer helper display for players in OtherPlayers to None
            Actor - Send message "Create TriggerPerPlayerActorAgent" to actor Actor
            Variable - Set Agent = (Actor connected to Actor via reference "::LastCreatedActual")
            Actor - Send message "AliasAdd _TriggerTarget" to actor Actor
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Immediate == On
                Then
                    Actor - Send message "Signal Destroy_Immediate" to actor Agent
                Else
                    Actor - Send message "Signal Destroy_Normal" to actor Agent
            Actor - Send message "AliasRemove _TriggerTarget" to actor Actor
            Actor - Send message "Destroy" to actor Agent
            UI - Unlock flyer helper display for players in (All players)
    

    And the agent actor:

    just need 4 lines. Concise, isn't it?

        <CActorSimple id="TriggerPerPlayerActorAgent">
            <On Terms="Signal.*.Show; FlyerHelper All" Target="_TriggerTarget" Send="SetVisibility 1"/>
            <On Terms="Signal.*.Hide; FlyerHelper All" Target="_TriggerTarget" Send="SetVisibility"/>
            <On Terms="Signal.*.Destroy_Immediate; FlyerHelper All" Target="_TriggerTarget" Send="Destroy Immediate"/>
            <On Terms="Signal.*.Destroy_Normal; FlyerHelper All" Target="_TriggerTarget" Send="Destroy"/>
        </CActorSimple>
    

    And about the sample map:

    There is a test trigger in this map, with 2 custom functions list above.

    Everytime any player press "Esc" key, the test trigger do follow things:

    1]Destroy the Orbital Command's Main actor for Player 1(It's splat actor will remain).

    2]Show 2 random unit, hide 2 random unit for player 1.

    3]Show 2 random unit, hide 2 random unit for player 2.

    4]Hide Store Front(doodad) for player 2.

    5]Hide Xel'Naga Hull Reactor(doodad), Fallen Asteroids Scattered(doodad), Char Arm(doodad) for player 1.

    The sample map can be test in test document or be tested online with 2 players (US.battle.net player could search the map name "Per Player Actor" in the game list.)

    You can make more acor messages sent asynchronously with this way, "SetVisibility" and "Destroy" are just two examples, we can even remake the "phase" technology of wow in SC2.

    Posted in: Tutorials
  • 0

    posted a message on Trigger-created Actors and Black Mask

    @samwise210: Go

    It seems you are the one who posted the same question in offical forum. I can paste my answer again:

    1]You go to Map->Map Info->Option and set Unexplored Area to Black Mask.

    2]Modify your Doodad's Actor - Fog Visibility field, and change it to Visible

    Posted in: Miscellaneous Development
  • 0

    posted a message on 1.3.0 PTR new bug - EditBox lost focus when input

    1.3.0 ptr fixed the bug that the trigger created Edit Box won't throw text change event when the text has been cleared.

    But there is a new bug comes with the the new patch.

    When ever we input anything into the editbox, it will aways lost focus. For example, if we try to input "123456" into a trigger created edit box. When we press "1", the edit box lost focus, and we need to focus on the control with mouse and press "2", and "3", "4"....

    So the control has become useless. Hope blizzard could fix it.

    Posted in: Galaxy Editor Bugs and Feedback
  • To post a comment, please or register a new account.