• 0

    posted a message on Dialog Buttons Controlling Abilities

    What I'm looking to do is to have dialog buttons control abilities that the player has access to, but not any belonging to any specific unit that he owns.

    So some examples of this would be in Command and Conquer where you have these little buttons that sit on the side of your screen and you click them to call in artillery or missiles or air strikes or whatever.

    What I'm looking for specifically would be this: I click the "airstrike" button, whatever units I currently have selected stay selected, an underlay is shown below the cursor that shows me the radius of the airstrike, I click the mouse and that calls in the attack.

    If that's too complicated, can I use one click of the dialog button to select some building and an ability that it has? That way, clicking the dialog button would de-select my previous guys but at least it would immediately bring up the area icon. I could just have buildings sitting in a hidden part of the map and give them the abilities that I want.

    I don't need a really specific answer to this question, but a vague idea of what triggers to use would be greatly appreciated.

    Posted in: Triggers
  • 0

    posted a message on Display a variable in text

    @TheAlmaity: Go

    Thanks a ton! :)

    Posted in: Triggers
  • 0

    posted a message on Display a variable in text
    Quote from TheAlmaity: Go

    First: "Text message: (Name of player X) has (Number of living units in unit group (units in Region Y owned by player X matching condition: Excluded: Missile (and the other defaults) in (dunno how to get region name, maybe just create a text variable array with the region names and use an integer variable to find the appropriate region array index)"

    Could you be a bit more specific? The problem I'm having is that I don't know how to display variables (even strings) interspliced with the text in the message. Do I need to use the custom script tab instead of the value tab? If I just pick a function like "player name," it displays fine, but there's no place to put additional text.

    If I do need to use the custom script tab, what kind of syntax do I need to use to call functions and variables?

    Posted in: Triggers
  • 0

    posted a message on Display a variable in text

    How do I display a variable in a text output? This could be useful in both regular messages displayed in the subtitle area, dialogue box, or debug message.

    What I want to have happen is:

    "[player name] has [number of units] in [region name]"

    I have all the region names stores in an array of strings (though if you can just display the region name straight from the region variable type, please let me know).

    2nd question: How do I retrieve a player's name to display?

    Thanks!

    Posted in: Triggers
  • 0

    posted a message on Player Group variable type

    A Player Number is stored as an integer. So for example, the value of "Player 1" is just "1".

    What kind of variable is a Player Group and what kinds of math / and or comparisons can the SCII engine do with it? I am aware that "Player Group" is in fact it's own kind of variable like integer, string, etc. But what I need to know is what sorts of boolean, mathematical, and comparative expressions can I perform with it?

    For example, if I have a Player Group that contains players 1, 2 and 3, and I ask it: Does Player Group == Player 3? What is the response? The two values are clearly not equivalent so I'm guessing it should say "false." What if I ask it to subtract 1 from the Player Group? What does it do?

    Also: If I have a lobby divided into two teams of four, and in the end the teams end up with 3 people on each side (filling slots 1,2,3 & 5,6,7) and the game starts, are the players numbered 1 to 6 or 1,2,3 & 5,6,7?

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