• 0

    posted a message on Number Loop.

    @TheAlmaity: Go

    Actualy no, i didnt notice the else statement. Come to think of it, that very well be my issue. I have never used the else command (didn't mean to here either).

    Posted in: Triggers
  • 0

    posted a message on Number Loop.

    Anyone?

    Posted in: Triggers
  • 0

    posted a message on Problem with rewarding players with minerals for a kill

    @gorang: Go

    I was also haveing a problem similar to this (adding varing points dependent of unit type). Try this. Not tested yet.

    They are all in attachements

    One shows the 3 global variables that I used.

    UnitKilledType assigns a value, (however many points you want) to UnitTypePoints and a unit type to UnitType

    This one feels kind of barbaric, as I used a monstrous if then statement. Whenever a unit dies, it runs a integer loop from 1-64 (1- however many units types you have). Then it runs a check saying if the unit type in UnitType[spot number of check] = unit type of killed unit, then add the amount of points in UnitTypePoints[spot number of check] to PlayerPoints[killing player]

    It shouldnt be to hard to instead add the number to the players mineral count.

    Good luck

    Posted in: Triggers
  • 0

    posted a message on Number Loop.

    I think I found one issue, I was using the '"or each integer" along with "pick each integer" which are imcompatable, So i changes it up a little.

    The new versions are attached.

    Any help would be awesome.

    Posted in: Triggers
  • 0

    posted a message on Number Loop.

    Ok, so I have made some modifications, following what I think you were saying to do.

    Instead of typing it all out, i have attached screen shots of the triggers, so they keep their proper formatting.

    The team assigning works fine, the issue is with the points.

    NOTES::

    SpawnZones- A global variable point array. It has a point assigned to each number 1-8 in its array. (Spawn1,Spawn2...Spawn8)

    SelectorZones- A global variable point array. It has a point assigned to each number 1-8 in its array. (Selector1,Selector2...Selector8)

    Team1- A global variable playergroup array.

    SpawnLocations- A global variable point array.

    SelectorLocations- A global variable point array.

    CreateQuantity- A global variable integer array.

    The other half of these are in the Team1, which is exactly like Team1, so I didnt add it.

    /NOTES::

    Look at the Team1 attachment first.

    So, from my understanding of how this trigger works, is that it first assigns all the SpawnZones and SelectorZones. Then it takes all the active user controlled players on team one (based on teams in lobby) and adds them into a playergroup Team1. I think this is working, as I have tested it with friends, and the team chats worked properly.

    Now then, the part that doesnt work. I have an integer loop set up to run 4 times. Each time it runs, it picks a player from Team1 and sets a SpawnLocation and a SelectorLocation. This way all the players on team 1 have points that will group them together in the game.

    However, this doesnt work. What I am using to test this is shown in the SpawnSelectorInitial attachment.

    I have this trigger set to run 1 second into the game, so the Team1 trigger runs before this one, as some things need to be set up first. When this trigger executes, it sets all the CreateQuanitity array integers to 1. Then, for every active user controlled player in the game, it spawns 1 zealot at the SelectorLocation of each player. However, no zealot is spawned, and I have no Idea why.

    If anyone can help, that would be awesome.I have the feeling that I am using/interpreting the loop statements incorrectly.

    Posted in: Triggers
  • 0

    posted a message on Go to nearest [creep]

    What about the possibility of giving creep a mineral count. If you were to make creep have all the aspects of minerals, wouldnt workers treat it as such?

    Or re-skin minerals, along with removing their footprint, which would allow units to walk over them.

    Or, you could do a combination of things, such as having invisible mineral fields, which you would place on top of creep. Then you could create a trigger that states all areas without mineral fields cannot have creep on them, which would make it so as soon as you mined out the minerals, the creep would die.

    I think.

    Posted in: Triggers
  • 0

    posted a message on Number Loop.

    I am trying to get around the lobby =/= player number issue.

    So what I was going to do, is as follows.

    Team1

    Events

    Game - Map initialization

    Local Variables

    Conditions

    Actions

    Player Group - Pick each player in (Players on team 1) and do (Actions)

    Actions

    General - If (Conditions) then do (Actions) else do (Actions)

    If

    (Controller of player (Picked player)) == User

    Then

    Player Group - Add player (Picked player) to TeamPlayers1

    Else

    Player - Make all players in TeamPlayers1 treat each other as Ally With Shared Vision

    Player Group - Pick each player in TeamPlayers1 and do (Actions)

    Actions

    Variable - Set Players[(Picked player)] = (Picked player)

    Variable - Set SpawnLocations[(Picked player)] = Spawn#

    NOTE:: So this gets the allies correct. Along with assigning an integer to each player that can be referenced by functions that need numbers.

    NOTE:: The variable SpawnLocations is an array of start locations. Where Spawn# is a specific Start Location.

    Now then, what I cannot figure out how to involves the last line. What I need is that each time the loop runs, for it so pick a different Spawn#, that way each player in the group gets a unique starting location, (which is what they are). Also, they need to be consecutive numbers beginning from 1. (example, 1,2,3,4)

    If anyone could help me out that would be awesome.

    Posted in: Triggers
  • 0

    posted a message on Unit upgrades with trigger.

    Is there a way to make units start with a upgrade by using a trigger?

    For example, marines would always (for every player including neutral) have their combat shields, without needing to be researched.

    I intend on giving units all units their upgrades (not weapons and armour).

    Thanks for any help.

    Posted in: Triggers
  • 0

    posted a message on Unit upgrades

    Is there a way to make units start with a upgrade?

    For example, marines would always (for every player including neutral) have their combat shields, without needing to be researched.

    I intend on giving units all units their upgrades (not weapons and armour).

    Thanks for any help.

    Posted in: Data
  • 0

    posted a message on Multiple Nukes/No Factory

    Does anyone know how to remove requirements for producing a unit? I want to have it so nukes can be built even when there is no factory. However, even when I set the command to have no requirements, it is overridden by something else.

    The second part, does anyone know how to change magazine capacity? (I think this might also need to have a requirement "no nuke in silo" removed). However, nothing I seem to do works, but I was able to have the silo make 3 nukes at a time, which could suffice if necessary.

    Posted in: Data
  • 0

    posted a message on Retrieving data value.

    Does anyone know how I would go around getting a value from a unit?

    What I need to happen, is that whenever a unit dies, its populous value is recorded into a variable.

    I have everything but obtaining this value, which I cant figure out.

    Thanks

    Posted in: Triggers
  • 0

    posted a message on Removing units

    So I am having problems with a trigger. My goal is this,

    When at least 4 units enter the region Battlecriusers, 3 battlecruisers will spawn at a the players spawn point.

    This part works.

    Now, after the 3 battlecruisers are made, I want the 4 units to die. But only for, because it may be the case that there are more than 4 units in the triggering area.

    This is what I am using for code, anyone see any problems with it, or know how to do what I described with a different way?

    Posted in: Triggers
  • 0

    posted a message on Triggering units counter.

    @OneSoga: Go Would you care to elaborate on that? Im not really sure what you mean.

    However, more importantly, does any one see what is wrong with this code? (in the attached image)

    What I am trying to do is as follows.

    When a total of 4 or more units (zealots) walk into the region "battlecruisers" the trigger activates. Then 3 battlecruisers are added to the player and stuck into a global unit group. Then the zealots (exactly 4) that are inside the triggering area are removed from the game.

    Now then, here is what happens.

    When a total of 4 or more units (zealots) walk into the region "battlecruisers" the trigger activates. Then 3 battlecruisers are added to the player and stuck into a global unit group. Then a zealot (exactly 1) that is inside the triggering area are removed from the game. This leaves the other 3 sitting in the trigger area.

    Posted in: Triggers
  • 0

    posted a message on Triggering units counter.

    Awesome. Thanks so much for that.

    I have another question too.

    I am trying to create unit at a point linked with a specific player. At the moment, I have 8 If then statements saying "if players 1, then location 1" "if player 2, then location 2" and so on.

    Do you guys know of a more efficient way to do this. However, I have already linked start locations to each player, and have used them all with create units for player (triggering player) at start location of player (triggering player).

    Thanks, Bob

    Posted in: Triggers
  • 0

    posted a message on Triggering units counter.

    So here is my predicament. I am trying to set a condition as following.

    Compare the number of triggering units by owner of triggering units to value 1

    My trigger is a enter region type, so basically what I want is that when x units of player x go into it, it starts.

    I cant find how to do this for the life of me, and if i cant, the number of triggers my map will have will be 8 times larger, one for every player, not to mention a global variable for every trigger.

    If you guys got anything to help, that would be awesome.

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