• 0

    posted a message on max units created. count kills and razes

    ok so this is what i'd like to do:

    A. player brings unit to regionA = spawns that specific unit at regionB to a max of X B. player gets X kills = unit created at regionC C. Player gets X Razes(building kills) = recorded so i can create units etc like with the kills.

    this is all for more then 1 player so i read using a integer[X] is easier. (array of X players) what is actually happening:

    A. bring unit to regionA works and spawns a unit but spawns half of what i wanted it to. do buildings etc count as a unit with this trigger?

    total units
        Events
            Unit - Any Unit Enters (Entire map)
        Local Variables
        Conditions
            (Owner of (Triggering unit)) == 1
        Actions
            Variable - Modify MAX POP[1]: + 1
    
    remove from total units
        Events
            Unit - Any Unit dies
        Local Variables
        Conditions
            (Owner of (Triggering unit)) == 1
        Actions
            Variable - Modify MAX POP[1]: - 1
    

      MAX POP = 0 <Integer[8]>
    

    variable. btw how do you know if a variable is global or not?

    B. have this:

    Kills
        Events
            Unit - Any Unit dies
        Local Variables
        Conditions
        Actions
            Variable - Modify PlayerKills[(Triggering player)]: + 1
    
        PlayerKills = 0 <Integer[8]>
    

    C. have no idea how to do this.

    looking for any help that can fix these 3 problems im having. thanks in advanced

    Posted in: Triggers
  • 0

    posted a message on inventory - Items not working

    ok so i've got the SOTIS inventory semi working

    all 6 are working

    u can pick up and drop move around etc

    but the item effects arnt working... any help?

    Posted in: Data
  • 0

    posted a message on Keeping track of kills problem
    Quote from Pfaeff: Go

    Note: you should use modify variable instead of

    Variable - Set PlayerKills[(Triggering player)] = (PlayerKills[(Triggering player)] + 1)
    

    because it is less error-prone.

    I also recommend to use only one trigger and an if-statement instead of a trigger condition.

    I also recommend to use only one trigger and an if-statement instead of a trigger condition.

    How would i achieve that?

    also i cant seem to count building kills could someone please explain how to do that? so it will count building kills.

    Posted in: Triggers
  • 0

    posted a message on Keeping track of kills problem
    Quote from IsoRev: Go

    @zISilenced: Go

    your condition is messed up. the condition has to apply to the event. so what fires the trigger is when any unit dies. that has nothing to do with the triggering player. an example of triggering player is when a played uses a dialog item or leaves the game. you haev to change that to the owner of the triggering unit also with the action in your second trigger. needs to say owner of triggerint unit. you also want to just modify the global variable, dont set it.

    thank you

    i changed " Unit dies " to " Unit - (Killing unit) dies " and it works thank you! would u be able to answer my last question

    side question how would i do the same for counting building RAZES as in the ammount of buildings a player has destroyed.

    Posted in: Triggers
  • 0

    posted a message on Keeping track of kills problem

    hi this is basically what i want to happen

    it counts all kills for 8 players when a player gets 10 kills 2 units are created at X and X region (unique to the player, cannot be the same) and a message pops up(to the player who got 10 kills) saying u have gotten 10 kills etc

    this is what ive got:

    TRIGGER 1

    p1 get bela
        Events
            Unit - Any Unit dies
        Local Variables
        Conditions
            PlayerKills[(Triggering player)] == 10
        Actions
            UI - Display "10 Kills l" for (Player group(1)) to Chat area
            Unit - Create 1  UNIT1 for player 1 at (Center of RED S) facing 45.0 degrees (No Options)
            Unit - Create 1  UNIT2 for player 1 at (Center of RED S2) facing 45.0 degrees (No Options)
    

    TRIGGER 2

    Kills
        Events
            Unit - Any Unit dies
        Local Variables
        Conditions
        Actions
            Variable - Set PlayerKills[(Triggering player)] = (PlayerKills[(Triggering player)] + 1)
    

    i got a global variable that is a integer ARRAY with 8

    PlayerKills = 0 <Integer[8]>

    can someone please help me achieve this.

    side question how would i do the same for counting building RAZES as in the ammount of buildings a player has destroyed.

    Posted in: Triggers
  • 0

    posted a message on how do i do this
    Quote from LordAbyss: Go

    When you click on the set variable portion you want to use Arithmetic (Integer)

    thank you!

    i was putting it as a custom script and it would always return errors

    thank you alot mate

    Posted in: Triggers
  • 0

    posted a message on how do i do this
    Spawn
        Events
            Timer - Every 2.0 seconds of Game Time
        Local Variables
        Conditions
            Zerglings (P1) < 200
        Actions
            Unit - Create 1 Zergling for player 1 at Point 001 facing 270.0 degrees (No Options)
            Variable - Set Zerglings (P1) = (Zerglings (P1) + 1)
    
    
    
    
    Death
        Events
            Unit - Any Unit dies
        Local Variables
        Conditions
            (Unit type of (Triggering unit)) == Zergling
            (Owner of (Triggering unit)) == 1
        Actions
            Variable - Set Zerglings (P1) = (Zerglings (P1) - 1)
    

    this is copied from another post btw<sub> but im just wondering how i set the variable - 1 or whatever</sub>

    Variable - Set Zerglings (P1) = (Zerglings (P1) - 1)

    all i can seem to get is this Variable - Set Max Pop p1 = Max Pop p1

    how do i set it + 1 or - 1?

    thank you in advanced =====

    Posted in: Triggers
  • 0

    posted a message on [HELP] Unit in Region = unit spawns at X region

    woah thanks for helping i keep on trying to do something aswell but i cant get the triggers to repeat.

    heres what i got atm: (3 triggers , no variables)

    Turn Roach OFF
        Events
            Unit - Any Unit Leaves RED UNIT MAKER
        Local Variables
        Conditions
            (Unit type of (Triggering unit)) == Roach
        Actions
            Trigger - Stop all instances of Roach Spawn
            Trigger - Run Turn Roach ON  (Check Conditions, Don't Wait until it finishes)
    
    Roach Spawn
        Events
            Timer - Every 1.0 seconds of Game Time
        Local Variables
        Conditions
            [RED] Max unit cap <= 100
        Actions
            Unit - Create 1 Roach for player 1 at (Center of TEST) using default facing (No Options)
    
    Turn Roach ON
        Events
            Unit - Any Unit Enters RED UNIT MAKER
        Local Variables
        Conditions
            (Unit type of (Triggering unit)) == Roach
        Actions
            Trigger - Run Roach Spawn  (Check Conditions, Don't Wait until it finishes)
            Trigger - Stop all instances of Turn Roach ON
    

    so basically what im trying to get happen is

    the roach enters the region

    Roach ON waits for a roach to enter the region

    Roach ON then activates Roach Spawn (which is initially off)

    Roach ON after doing above turns Roach ON off.

    Roach OFF is always on and when the Unit Roach leaves the region turns Roach Spawn off

    Roach OFF then turns Roach ON back on.

    also i cant seem to get it to keep spawning other then once... because it only spawns when the unit goes into the region, and not until it leaves the region any ideas on how i could make it so that it spawns UNTIL the Roach leaves the region?

    Posted in: Triggers
  • 0

    posted a message on [HELP] Unit in Region = unit spawns at X region

    thanks ill see how it goes..

    the unit only spawns once then i have to move the unit out of the region then back into it 1 thing i'd like to know tho how can i change the trigger so that instead of having to choose a unit on the map i can pick from a list of units like custom ones made in the data editor...? 1 other question what is <Game Link - Unit>?

    Posted in: Triggers
  • 0

    posted a message on [HELP] Unit in Region = unit spawns at X region

    ok well after playing around abit i got it to work but... it only worked because i think(not too sure) it has something to do with my max unit cap it was spawning red units when using blues unit cap but now when i change it to reds it doesnt spawn

    also the problem why it wasnt spawning in the first place was because of the " General - Repeat (Actions) forever Actions " adding the create units under there didnt make them spawn but moving them up to the Actions it did.

    now ive got this error: error

    RED
        Events
            Timer - Every 1.0 seconds of Game Time
        Local Variables
        Conditions
            [RED] Max unit cap <= 100
            ((Triggering unit) is in RED UNIT MAKER) == true
            ((Triggering unit) is in frank unit group) == true
        Actions
            Unit - Create 1 Roach for player 1 at (Center of RED SPAWN) using default facing (No Options)
            Unit - Create 1 Roach for player 1 at (Center of TEST1) using default facing (No Options)
            Unit - Create 1 Roach for player 1 at (Center of TEST2) using default facing (No Options)
    
    Posted in: Triggers
  • 0

    posted a message on [HELP] Unit in Region = unit spawns at X region

    ok so as the title states im trying to make it so that this happens:

    lets say unit x is a marine

    the marine has to be somehow identified as a marine so that it will spawn a marine at region 2 when a marine is standing in region 1 same for the zerg if a ZERG and only a zerg is in region 1 then it will spawn a zerg at region 2.

    marine stands in region 1 marine is created at region 2 till max 452

    marine leaves region 1 no units are spawned. ( the marines being created stops until the marine goes back on region 1 )

    zerg stands in region 1 zerg is created in region 2 till max 452

    zerg leaves region 1 no units are spawned. ( the zergs being created stops until the zerg goes back on region 1 )

    this is what ive got atm:

    RED
        Events
            Game - Map initialization
        Local Variables
        Conditions
            [RED] Max unit cap <= 452
            And
                Conditions
            ((Triggering unit) is in RED UNIT MAKER) == true
            And
                Conditions
                    ((Triggering unit) is in frank unit group) == true
        Actions
            General - Repeat (Actions) forever
                Actions
            Unit - Create 1 Roach for player 1 at (Center of TEST) using default facing (No Options)
    

    also ive got another trigger:

    red(1)
        Events
            Timer - Elapsed time is 1.0 Game Time seconds
        Local Variables
        Conditions
        Actions
            Unit Group - Add Roach [103.41, 172.97] to frank unit group
    

    i know ive been blowing this trigger forum up with all my questions but im new what do u expect..

    so how can i achieve what im trying to do?

    please note aswell ive already got the max unit cap done.

    thank you if you can help me.

    Posted in: Triggers
  • 0

    posted a message on how to limit the ammount of units created?

    screen

    i just figured out how to create a unit today lol but i cant understand what your saying i should do this is what ive done

    3 variables (global) i think i dont know how u make it global. max units 41 units per spawn 1 current unit count 0

    trigger

    create unit marine

    i added a local variable thinking thats what you ment but im guessing it isnt.

    thank you in advanced

    Posted in: Triggers
  • 0

    posted a message on make units spawn tutorial or anything?

    hi just wondering if there is a tutorial on how to spawn units

    also another question

    "Create Unit Facing Angle" "creates unit facing a specified angle. use the "last created unit" and "last created units" functions to refer to the created units."

    can someone please tell me where last created unit and last created units functions are?

    Posted in: Triggers
  • 0

    posted a message on how to limit the ammount of units created?

    hi im new to this and im just starting to learn and was wondering how you can limit the amount of units created.

    like max 100 will spawn and no more till 1 dies and it will spawn 1 more.

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