I searched everywhere. Can't seem to find the info I need. Hopefully one of you mapping genius' can help me out.
The issue is, I need units to Stop spawning at a particular score, then switch to a new unit.
I have the first ones spawning just fine, but can't seem to get them to stop spawning once the score is reached.
Events.
Timer - Every 2.0 seconds of game time.
Variables
Conditions
Actions
Unit - Create 1 Level1 - Unit at - (Position of bunker1) Using Default facing (No options)
I have it so that each level1 unit is worth 50 points.
The goal is to get it to stop spawning these level 1 units once a score of 2000 is reached. (The scoring and leaderboard updates just fine.)
They do not stop spawning.
Stop trigger.
Events
Local Variables
Conditions
0 <= Score(0) <= 2300
Actions
Trigger - Stop all instances of Level1
I am also clueless as to continue spawning a new type of unit after this trigger has stopped.
Any help would be greatly appreciated. Thanks!
2 things you could do is either: a) Make it so that everytime the spawn trigger runs it runs the stop trigger, so that when the spawn trigger caps the score the stop trigger automatically stops it. or b) Add a timer to the stop trigger that keeps it checking every time the timer goes.
I would go with a) as it would be neater and would make sure the spawn is capped immeadiatly.
For your second problem all you need is a action in your stop trigger that turns on the trigger that spawns the next level of units.
I couldn't get either of these to work. Although they both make perfect sense, I just happened to miss them.
I think I may be going about stopping it wrong.
Is there a way around the "Within bounds" Trigger under the IF conditions?
Something else to specify what score to stop at.
I added to the Spawn trigger.
Trigger - Run stop level1 (Check, conditions, dont wait until it finishes)
I added a timer to the stop trigger.
Events
Timer - Every 0.05 seconds of game time
Local Variables
Conditions
Actions
General
If 0 <= Score(0) <=2300
Then
Trigger - Stop all instances of Level1
Else.
I also tried adding Any unit dies to the Events.
and The "Within bounds" is the 0 <= Score(0) <=2300.
I think that's where the issue lies. (Could be mistaken.)
If there is another way to specify that I want it to stop creating level 1 units at 2300.
Also I am very new to this so I could just be messing up.
For running the stop trigger you either need the run event on the spawn trigger or the timer on it, both arn't necessary unless it's possible that the amount of units will change outside of the spawn trigger.
For the within bounds part you should have:
If : (Your integer variable) == 2300 (If its possible the number of points from the units won't line up exactly to 2300 then change it >=)
I searched everywhere. Can't seem to find the info I need. Hopefully one of you mapping genius' can help me out.
The issue is, I need units to Stop spawning at a particular score, then switch to a new unit. I have the first ones spawning just fine, but can't seem to get them to stop spawning once the score is reached.
Events.
Timer - Every 2.0 seconds of game time.
Variables
Conditions
Actions
Unit - Create 1 Level1 - Unit at - (Position of bunker1) Using Default facing (No options)
I have it so that each level1 unit is worth 50 points. The goal is to get it to stop spawning these level 1 units once a score of 2000 is reached. (The scoring and leaderboard updates just fine.) They do not stop spawning.
Stop trigger.
Events
Local Variables
Conditions
0 <= Score(0) <= 2300
Actions
Trigger - Stop all instances of Level1
I am also clueless as to continue spawning a new type of unit after this trigger has stopped. Any help would be greatly appreciated. Thanks!
Your end trigger is never running.
2 things you could do is either: a) Make it so that everytime the spawn trigger runs it runs the stop trigger, so that when the spawn trigger caps the score the stop trigger automatically stops it. or b) Add a timer to the stop trigger that keeps it checking every time the timer goes.
I would go with a) as it would be neater and would make sure the spawn is capped immeadiatly.
For your second problem all you need is a action in your stop trigger that turns on the trigger that spawns the next level of units.
under Events on the 2nd trigger there should be a "Any Unit Dies" event
I couldn't get either of these to work. Although they both make perfect sense, I just happened to miss them. I think I may be going about stopping it wrong.
Is there a way around the "Within bounds" Trigger under the IF conditions? Something else to specify what score to stop at.
What did do try to do to fix the problem? What events or triggers did you add?
Also what do you mean by the "Within bounds" trigger?
I added to the Spawn trigger. Trigger - Run stop level1 (Check, conditions, dont wait until it finishes)
I added a timer to the stop trigger. Events
Timer - Every 0.05 seconds of game time
Local Variables
Conditions
Actions
General
If 0 <= Score(0) <=2300
Then
Trigger - Stop all instances of Level1
Else.
I also tried adding Any unit dies to the Events.
and The "Within bounds" is the 0 <= Score(0) <=2300. I think that's where the issue lies. (Could be mistaken.) If there is another way to specify that I want it to stop creating level 1 units at 2300. Also I am very new to this so I could just be messing up.
For running the stop trigger you either need the run event on the spawn trigger or the timer on it, both arn't necessary unless it's possible that the amount of units will change outside of the spawn trigger.
For the within bounds part you should have: If : (Your integer variable) == 2300 (If its possible the number of points from the units won't line up exactly to 2300 then change it >=)
Then: Turn (Spawn Trigger) Off
@PreTenD: Go
create an array of unit types.... as the score change increment the index .....
create the units based on the unit type of the unit type array index
Thanks guys. Got it with the last bit of info you all supplied! :) Works perfect. Appreciate the help.