• 0

    posted a message on Trigger Challenge: Structure Visibility

    another bump ... still haven't been able to figure this one out. Even started investigating the View Menu (SC2 Layout files), which is what provides the vision selection during replays...does exactly what I need but I can't get it to show up.

    Anyone have any ideas? This definitely seems like it should be possible.

    Posted in: Triggers
  • 0

    posted a message on how to make stalkers blink properly backward?

    @neverwin1011: Go

    Sounds like you want to use the modulo function. Just take any number and mod it by 360 and you'll get the angle expressed in terms of 0 to 360. I think the engine does this in the background anyway, but it's useful if you don't want to deal with huge numbers when adding large polar offsets.

    Posted in: Triggers
  • 0

    posted a message on how to stack buildings

    @AreYouScared: Go

    I'm referring entirely to Triggers, not Data.

    Posted in: Triggers
  • 0

    posted a message on Combining Texts - With line breaks?

    @Fullachain: Go

    "<n/>" is the newline entity in text so you could say

    Here's line one<n/>and here's line two<n/>and here's line three

    I would use Combine Text Multiple and just type a literal carriage return into the spots where you need newline. It's probably fastest way.

    Perhaps your label is not tall enough to show the text and that's why it's blank?

    Posted in: Triggers
  • 0

    posted a message on Trigger Based On Unit Proximity

    @DaBernMon: Go

    It sounds like you want to keep track of your ingredients. I would use a Record called recIngredients and inside it setup something like the following:

    intTimestamp - integer storing mission time when it was created

    intType - integer ID of type (1= iron, 2 = gold, 3 = silver)

    uUnit or aActor - reference to actual unit or actor on the map

    Then create an array called recIngredients and make it big enough to hold all the ingredients you'll ever need to track. Also create a global variable called intNumIngredients. Now whenever you create an ingredient on the map, store it in the array and increment intNumIngredients.

    Now that you have that basic data structure in the background, make sure it stays up to date and reflects the world state (the actual ingredients on the map). When you remove an ingredient, you'll need to loop through your array and check to see if the unit/actor matches. If it does, then generate a new ingredient and replace the old data with the new data. The editor doesn't have good array functions, so you'll have to write your own patterns to push/pop/sort.

    Hope that makes sense. I highly recommend arrays of records...it's like having a database in the background. Record defines "columns", array defines "rows" and array indexes define "IDs".

    Posted in: Triggers
  • 0

    posted a message on how to stack buildings

    @AreYouScared: Go

    If by stack you mean they all occupy same space, you can just check off "Ignore Placement" in the Flags section of Create Unit function.

    If you mean you want them to look as if they are stacked on top of each other, I suppose you could Send an Actor Message to the Actor of the Unit and move it into the air. This would be a visual effect only.

    Posted in: Triggers
  • 0

    posted a message on Need help with triggers.

    @LunaticGirge: Go

    Well this sounds like a unit management issue. You need to be able to refer to specific units and sometimes you need to know metadata about them. Luckily the game probably stores everything you need. When a unit is created for a player, store that unit in a Unit Group, and/or in an array of type Unit. That way you can refer back to it later. You could either loop through the array with For Each Integer, or you could look through the Unit Group with Pick Each Unit in Unit Group.

    If you're looking at a very simple situation, you might not even need to store them in separate variables, but instead refer to Triggering Unit in your Unit Enters Region event.

    If you go into the Functions and start familiarizing yourself with what's available in the Units section, you should be able to figure things out. You'll need Owner of Unit and Issue Order at least.

    Posted in: Triggers
  • 0

    posted a message on how to make stalkers blink properly backward?

    @strhsxx: Go

    I think you're dealing with Issue Order here to get Stalkers to blink. The Ability would be Ability with Target and you'd specify Blink as the ability, so that means you're left with calculating the point (or at very least direction) of the blink. To do this you'll need to do a little math. First you'll need to get the direction (angle) of the attacking unit, and then just add 180 to that to get the "opposite" direction to blink in. There are probably several good ways to do this so I'll leave that up to you.

    I think you'd have a Trigger with Event "Unit Attacked". You can then get the Triggering Unit (attacked unit) and Attacking Unit inside there.

    Posted in: Triggers
  • 0

    posted a message on Actual chat interface in a dialog

    @DuckyTheDuck: Go

    Yes, unfortunately since Blizzard doesn't expose "slash" commands (such as "/w" for whisper) as chat events, there's no way to capture those. There were several people on here who said "don't hide chat interface, people won't like lack of slash commands", but actually I'm hearing complaints about the lack of chat during Pause, not lack of slash commands.

    Posted in: Triggers
  • 0

    posted a message on Actual chat interface in a dialog

    I've hidden the normal Chat output UI (via SC2 Layout files) and replaced it with a dialog and custom chat system. The problem now is that when the game is Paused, no one can chat since I can't pick up on those chat messages during a pause and the normal output is hidden. Is it possible to create a standard chat output frame in a dialog that can be shown when the game is paused? Something akin to using a panel template?

    I suppose this would also mean I need to have an event that fires when the game is Paused...doesn't look like that's even included in the Editor. Hopefully someone can correct me.

    Posted in: Triggers
  • 0

    posted a message on Starcraft 2 Credits in my map... WHAT?

    @Xildarkz: Go

    This happens when you try to Hide Game UI (or is it Cinematic Mode) when it's already hidden. Strange but true. To get around this, I have been very careful to make sure any call I make to the offending function is "undone" before calling it again. Welcome to the wacky world of Blizzard.

    Posted in: Triggers
  • 0

    posted a message on Status of Player question

    @zeldarules28: Go

    I witnessed it. Very strange.

    Posted in: Triggers
  • 0

    posted a message on Status of Player question

    I have an Action called "Initialize Players" that picks each player in All Players and for each one checks the Status of the player. The 3 options on Status are "Left The Game", "Playing", and "Unused". I have been checking that each player is "Playing" and if so add them into the Leaderboard, for example. I found that for at least one player who said he was alt-tabbed out of SC2 during the load screen, he didn't show up in the Leaderboard and complained that he didn't see the normal interface. So at the start of the game, apparently his Status was *not* "Playing". Has anyone else had this experience?

    I guess the thing to do here is check to see whether the Status on a Player *is not* "Left the Game" or "Unused". This assumes that there is some other undocumented/uncheckable Status...only way I can rationally explain this.

    Posted in: Triggers
  • 0

    posted a message on Actor halo color

    I am using Send Actor Message to send the message "Halo Start" to the Actor of a Unit. This causes the actor to be outlined in a white halo. Can this color be changed? I can't seem to find a corresponding message to do so.

    Posted in: Triggers
  • 0

    posted a message on Combining Items In A Specific Order

    @DaBernMon: Go

    I didn't even click the link but I think arrays are the clear choice here. Let's say you have an array that holds your recipe ingredients...let's say each ingredient has an integer "ID" associated with it, you would just load up your ingredient array with those IDs, in order.

    I use this technique a lot for player groups. The built-in Player Group functions don't take order into account. So I don't generally use those. I use arrays.

    Unfortunately the built-in array methods are pretty bad, so you have to manually keep track of array length, manually check for values, and manually push/pop items. I suppose I should write a library to fix that at some point.

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