• 0

    posted a message on Defeat for player group

    If you mean per player

    Untitled Trigger 001
        Events
            Unit - Any Unit dies
        Local Variables
            count = 0 <Integer>
        Conditions
            And
                Conditions
                    (Triggering player) != 0
                    (Triggering player) != 15
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Number of Living units in (Any units in (Playable map area) owned by player (Triggering player) matching Required: Structure; Excluded: Missile, Dead, Hidden, with at most 1)) == 0
                Then
                    Game - End game in Defeat for player (Triggering player) (Show dialogs, Show score screen)
                Else
    

    also i guess you need to end game for others with victory.

    Per team would be something like

    Untitled Trigger 001
        Events
            Unit - Any Unit dies
        Local Variables
            count = 0 <Integer>
            team = 0 <Integer>
        Conditions
            And
                Conditions
                    (Triggering player) != 0
                    (Triggering player) != 15
        Actions
            General - For each integer team from 1 to 2 with increment 1, do (Actions)
                Actions
                    Variable - Set count = 0
                    Player Group - Pick each player in (Players on team team) and do (Actions)
                        Actions
                            Variable - Modify count: + (Number of Living units in (Any units in (Entire map) owned by player (Picked player) matching Required: Structure; Excluded: Missile, Dead, Hidden, with at most 1))
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            count == 0
                        Then
                            Player Group - Pick each player in (Players on team team) and do (Actions)
                                Actions
                                    Game - End game in Victory for player (Picked player) (Show dialogs, Show score screen)
                        Else
    
    Posted in: Triggers
  • 0

    posted a message on Spawn unit upon unit death

    yes it should work. But if you use any waits between death and spawn you should drop position of dying unit into local point variable right away

    Posted in: Triggers
  • 0

    posted a message on Problem with Actor facing

    You may mean this if i'm correct

    Posted in: Data
  • 0

    posted a message on (SOLVED)Certain Auras Causing FPS lag

    i doesn't matter if it removes health or shoots pink ponies. The issues is 99% from the the mechanic running it. If you did any small mistake like some search area triggering itself etc (the loop) it will lag.

    Posted in: Data
  • 0

    posted a message on Displaying Number of Units in Unit Group Variables with Display Campain Message

    use 'combine text multiple' function in string category, that's what you mean?

    Posted in: Triggers
  • 0

    posted a message on Set Resources on Mineral Patch > 1500?

    i'm not familiar with issue but i was looking at behavior approach (a buff like) and i found that resource behavior of minerals have thing like "Capacity - 1500". I guess you need to up this.

    Are those called "Patches"? i was wondering what are you talking about


    Btw Catalogs are per player ;)

    Posted in: Triggers
  • 0

    posted a message on [Solved] Card Game Random Drawing

    if i'm correct (because it's confusing) you have similar problem like in this thread

    Posted in: Triggers
  • 0

    posted a message on Lighting Questions

    Place floodlight doodad somewhere, open light editor and play with values until is dark and only thing visible is floodlight.

    About the shadows. I actually had hard time finding attachable lights that could cast shadow. Shadows give more realism imo :)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Intro videos to Galaxy++
    Quote from SBeier: Go

    Although I don't think anyone really watches them..

    We do!

    I was actually going to post How nice someone bumped this because i couldn't find them. But if your going to update them then i'll wait bit more :p


    You could add link to this thread in assets page or somewhere

    Posted in: Galaxy Scripting
  • 0

    posted a message on Create Hero chooser Dialog
    Quote from sobatao: Go

    http://www.sc2mapster.com/wiki/galaxy/tutorials/

    Above link shows most of the stuff. Just scroll down to User Interface for Dialog hero selection.

    There's no "Dialog hero selection" and if you mean "Hero Selector" by Onetwo, he's showing more hybrid selector with camera, units on map etc. Much more knowledge to learn for beginners

    Posted in: Triggers
  • 0

    posted a message on Create Hero chooser Dialog

    don't know of any but it's fairly simple.

    //Create 2 global arrays for ex.UnitTypes[5] and MyDialogItems[5], also 1 MyDialog Variable
    //Build your dialog, save it to MyDialog, save created buttons to MyDialogItems[] and assign corresponding unit types to UnitTypes[] somewhere
    //How? in short. Create Button with text "Select Hero1"; Set MyDialogItems[1] = last created dialog item, Set UnitTypes[1] = Hero1
    Event : Player clicks dialog item
    local variables : int i = 0
    Conditions : Dialog containing (Used Dialog Item) == MyDialog
    Actions : 
    Hide MyDialog for (Triggering Player)
       For each integer 'i' from 1 to 5
          if ( Used Dialog Item == MyDialogItems[i] )
             Create 1 UnitTypes[i] for player (Triggering Player) somewhere
             Break()
    
    Posted in: Triggers
  • 0

    posted a message on How do I make a lightning storm?

    i recommend reading this tutorial + Beams in combination with triggers only to create effect in random points.

    Other cheap method could be some kind of normal actor thicken x y and stretched in z but you would need some decent model

    Posted in: Triggers
  • 0

    posted a message on Trigger from Assets Section Not Working Properly

    well the only possibility is obviously that you'r not using the ability. It's more data related. Also avoid 'any' stage because abilities have like 5 of those per cast so it will trigger multiple times.

    I believe ability need any effect to actually trigger (i'm like 60% sure of it) so if you removed effect add some dummy damage 0 in place

    Posted in: Triggers
  • 0

    posted a message on Select from Array with no Repeat Selections

    easy

    • <int> r = Random Integer 0 - 23
    • While(Qty Array[r] == -1) Let's say you don't use -1 in your array
      • r = Random Integer 0 - 23
    • Create unit Qty Array[r]...
    • set Qty Array[r] = -1

    Just make sure you always "remove" this way without exceeding array size. Otherwise all elements will be -1 and while will never end. If you want your array to keep values after that you need some separate action which will repopulate array

    With extremely bad luck or big array size it may slightly lag tho. For this i may recommend my List <T> which may easily remove value from List at given index and return new items count
    With list you would do

    int r
    int c
    repeat 5 times
       c = List Values Count ("Unit Qty",integer)
       if (c>0) then
          r = random int from 0 to c-1
          Create ( List Get <Integer>("Unit Qty", r) ) units ...
          List RemoveAt("Unit Qty", integer, r)
    
    Posted in: Triggers
  • 0

    posted a message on Changing camera - doesn't work!
    Quote from Simoneon: Go

    although I don't know how to increment the value of variable.


    Variable Set - (is always selected when adding new action)
    Variable Set MyInt = Math - Arithmetic (Integer) (MyInt+1)
    So in short MyInt = MyInt + 1

    OR

    Modify Variable - in variables tab
    Modify MyInt + 1

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