Hi!
Im sorry to bother you guys and must warn that im really no pro at this.
THOUGH i have come along way just figuring stuff out on my own and reading guides etc.
1)My problem is probably simple.
Map = 8 players
Teams = 4
Every 2 seconds a marine spawns from a building called "Bunker". (Map is very similar to zone control).
When over 120 units, the trigger pauses.. But i now want it to "If 120 enemy unit kills stop spawning marines and start spawning ... something else"
Script i have now for that trigger is:
(Event) Timer - every 2 sec. of game time
(Conditions) 0<= (Marine count for player 1, counting queued or better ) <= 119
(Action) Create 1 marine for player 1 at (Position of bunker [xx.xx.xxx]) using point facing (no option)
(Action) Order all units in (last created units) to (move targeting (center of region 001)) (replace existing orders) <<<<<<- Region 001 is just 1 abit away from bunker
....................................................................................................................................
2)My second question is probably very very very simple. I have put in that players get defeted if "bunker" dies.
But when all are dead (But me and the ally) it doesnt show victory. Now i do understand that i have to put in that if all enemys are defeated = victory for the allied. But i dont know how :(
@thommiej: Go
I guess he means that IF the player has killed 120 units or more THEN instead of marines he shall recive some other unit such as hellions or stalkers instead?
well that create another trigger + a variable (integer) with an arraysize of how many players u got.
on that new trigger make as event, any unit dies.
then search for "modify variable (integer)" and set the variable to your variable you made. as array choose "owner of unit" and as unit "killing unit"
then in your first trigger (or another new trigger) make as event "map init" of the game. first an "Pick every player and do actions" (or something like that :D) And than an if then else action . With if-condition set the type to integer and choose your variable. and as array "picked player" then set the second parameter to 120.
I think it's more simple than you realize. The "IF" part is a condition. (Idk if that's what you've been looking for but you'll say something if it's wrong) The victory action is simple. Type in "end game" in the search bar after you select "-all". There should only be 1 action left. That is your answer.
Its not that simple for me :( I figured it would be a condition, so this is what i do. I rightclick somewhere inside my trigger, choose new, condition and theres 4 alternatives: and, or, comparison, within bounds, text has been set, not
But which ever i choose it places itself under "Conditions" obviously and not "under one step in" a action...
Use the action if then else then you can put a condition on the action part of the trigger.
If you pres i when you open up the actions you should get the right one.
If you choose add new condition, it will always be placed in triggers condition.
Even if it appears in trigger condtitions, you can always mouse-drag it into IF/THEN/ELSE condition field.
You can right click on the IF word and choose new element, that will make condition appear instantly in the IF condition part.
You usually want to use Comparison to compare values, AND/OR are used if you want condition to return true if all conditions below them are true / any of them is.
Thanks for the reply, but my question then is how i apply a "IF/THAN/ELSE" row.. i mean i cant drag a condition, from conditions, to actions, but as i understand you i will be able to do this if i have a "IF/THAN/ELSE" under actions.. corrent?
God im sorry for my stupidity!
Ok, here we go!
What i have now is:
(Event) Timer - every 2 sec. of game time
(Conditions) 0<= (Marine count for player 1, counting queued or better ) <= 119
(Action) Create 1 marine for player 1 at (Position of bunker [xx.xx.xxx]) using point facing (no option)
(Action) Order all units in (last created units) to (move targeting (center of region 001)) (replace existing orders)
General - If (Conditions) then do (actions) else do (Action)
-IF ((Triggering units) kills (current)) > 1
-Then Trigger - stop all instances of Red spawn
-Else =blank
did you made an integer variable with an array of how many players are in your map? if so, make a condition and press enter. click the first bracklet (or double-click) and above the window you see type: with a dropdownmenu. There u choose integer. The first is you variable and then as array, picked player (you should have pick each player in playergroup) and the second one 120.
First off, how did you put triggering unit kills (current) in IF? that's and event definition not an condition.
Second, you seem to think triggers last and follow unit around or sth like that, but it's not the case. As soon as it runs, it ends (unless you use waits but that still wouldn't fit what you want). You'd need to create new trigger to run off when unit dies.
Also, you could explain what is (current) (i assume its some variable). If you want some value to be saved beetwen different triggers, you need to create Global variables, by right clicking beetwen triggers and adding new object, then selecting what type it should be, and if it should be an array, and of what size.
Hi! Im sorry to bother you guys and must warn that im really no pro at this. THOUGH i have come along way just figuring stuff out on my own and reading guides etc. 1)My problem is probably simple. Map = 8 players Teams = 4 Every 2 seconds a marine spawns from a building called "Bunker". (Map is very similar to zone control). When over 120 units, the trigger pauses.. But i now want it to "If 120 enemy unit kills stop spawning marines and start spawning ... something else" Script i have now for that trigger is:
- Region 001 is just 1 abit away from bunker.................................................................................................................................... 2)My second question is probably very very very simple. I have put in that players get defeted if "bunker" dies. But when all are dead (But me and the ally) it doesnt show victory. Now i do understand that i have to put in that if all enemys are defeated = victory for the allied. But i dont know how :(
Very thanks! /Doite
@doite: Go
got a question about you first question, what do you mean with "If 120 enemy unit kills"?
@thommiej: Go I guess he means that IF the player has killed 120 units or more THEN instead of marines he shall recive some other unit such as hellions or stalkers instead?
@Hellyonboy123: Go
Yes i do, sorry
@doite: Go
well that create another trigger + a variable (integer) with an arraysize of how many players u got.
on that new trigger make as event, any unit dies.
then search for "modify variable (integer)" and set the variable to your variable you made. as array choose "owner of unit" and as unit "killing unit"
then in your first trigger (or another new trigger) make as event "map init" of the game. first an "Pick every player and do actions" (or something like that :D) And than an if then else action . With if-condition set the type to integer and choose your variable. and as array "picked player" then set the second parameter to 120.
and your done :) it will look like this:
first trigger:
second trigger:
hope this helped!
@thommiej: Go
It did but ive been searching for all these hours how to do the "If" term! I really have no idea :( And also could you help with the victory part`? =)
@thommiej: Go
Thanks so much btw
I think it's more simple than you realize. The "IF" part is a condition. (Idk if that's what you've been looking for but you'll say something if it's wrong) The victory action is simple. Type in "end game" in the search bar after you select "-all". There should only be 1 action left. That is your answer.
@yukaboy: Go
Its not that simple for me :( I figured it would be a condition, so this is what i do. I rightclick somewhere inside my trigger, choose new, condition and theres 4 alternatives: and, or, comparison, within bounds, text has been set, not But which ever i choose it places itself under "Conditions" obviously and not "under one step in" a action...
If you need more help on triggers i can spare some time and iron out your holes for you on skype or vent. PM me if you want it.
Use the action if then else then you can put a condition on the action part of the trigger. If you pres i when you open up the actions you should get the right one.
@doite: Go
@uiasdnmb: Go
Thanks for the reply, but my question then is how i apply a "IF/THAN/ELSE" row.. i mean i cant drag a condition, from conditions, to actions, but as i understand you i will be able to do this if i have a "IF/THAN/ELSE" under actions.. corrent? God im sorry for my stupidity!
@uiasdnmb: Go
Found it! Hold on...
@uiasdnmb: Go
Ok, here we go! What i have now is: (Event) Timer - every 2 sec. of game time (Conditions) 0<= (Marine count for player 1, counting queued or better ) <= 119 (Action) Create 1 marine for player 1 at (Position of bunker [xx.xx.xxx]) using point facing (no option) (Action) Order all units in (last created units) to (move targeting (center of region 001)) (replace existing orders) General - If (Conditions) then do (actions) else do (Action) -IF ((Triggering units) kills (current)) > 1 -Then Trigger - stop all instances of Red spawn -Else =blank
@uiasdnmb: Go
And that doesnt work :(
@doite: Go
I want to write this.. Integer[picked player] == 120 But cant find it
@doite: Go
did you made an integer variable with an array of how many players are in your map? if so, make a condition and press enter. click the first bracklet (or double-click) and above the window you see type: with a dropdownmenu. There u choose integer. The first is you variable and then as array, picked player (you should have pick each player in playergroup) and the second one 120.
hope this is what you asked.
Could you try to paste it in code or just screenshot triggers? I have small problem with recognizing how your trigger is setup.
But from what I see, does your if then else look like this:
First off, how did you put triggering unit kills (current) in IF? that's and event definition not an condition.
Second, you seem to think triggers last and follow unit around or sth like that, but it's not the case. As soon as it runs, it ends (unless you use waits but that still wouldn't fit what you want). You'd need to create new trigger to run off when unit dies.
Also, you could explain what is (current) (i assume its some variable). If you want some value to be saved beetwen different triggers, you need to create Global variables, by right clicking beetwen triggers and adding new object, then selecting what type it should be, and if it should be an array, and of what size.
Ignore this one, se next post