Hi,
so basically, when a unit enters a specific region, it spawns units at another region every 15 seconds. I tried to make these as two separate triggers, so have one trigger create units every 15 seconds, and the other one call this trigger when a unit enters the area. But when you call a trigger, it ignores its event, so in my case it only spawns the units once. Any ideas?
Events
Timer - Every 15 seconds of Game Time
Condition
(Unit type of (Unit 1 from (Any units in DesiredRegion owned by player X matching with at most Any Amount)))==DesiredUnit
Action
Create Unit at DesiredPoint
Turn current trigger on
Hi, so basically, when a unit enters a specific region, it spawns units at another region every 15 seconds. I tried to make these as two separate triggers, so have one trigger create units every 15 seconds, and the other one call this trigger when a unit enters the area. But when you call a trigger, it ignores its event, so in my case it only spawns the units once. Any ideas?
Riley, even when you turn the trigger on again, the unit wouldn't be considered reentering the region, as its already inside it. He wants a contnious spawn so there isn't a need to set patrol on the units to keep spawninng them
Global Boolean SpawnMarine=false
______________________________________________________
MarineEnterSpawner P 1
Events
Unit - Any Unit Enters Player1SpawnerSpawn
Local Variables
Conditions
(Unit type of (Triggering unit)) == MarineSpawner
Actions
Variable - Set SpawnMarine P 1 = true
Trigger - Turn (Current trigger) On
MarineLeavesSpawner P 1
Events
Unit - Any Unit Leaves Player1SpawnerSpawn
Local Variables
Conditions
(Unit type of (Triggering unit)) == MarineSpawner
Actions
Variable - Set SpawnMarine P 1 = false
Trigger - Turn (Current trigger) On
_____________________________________________________________
MarineSpawning P 1
Events
Timer - Every 0.1 seconds of Game Time
Local Variables
Conditions
SpawnMarine P 1 == true
(Number of Living units in (Any units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, Invulnerable, with at most Any
Amount)) < 48
Actions
Unit - Create 1 Marine for player 1 at SpawnUnitsPoint P1 using point facing (No Options)
Trigger - Turn (Current trigger) On
________________________________________________________________________________________
This is another way I was using earlier, its longer, but simpler
actually thats eaxctly what i posted right above that
Just with values filled in
Actually, its got an extra population check in it, but one extra condition isnt what one calls a rube goldberg machine ;)
Also notice I put in another one two posts above that that only utilizes one trigger, but has fallible mechanisms (I.E. if theres a beacon or other unit in the region)
You're right I was thrown off by the fact that you put Turn Current Trigger On at the end of every trigger and thought you were doing something else. You realize that there is absolutely no reason for doing that?
Then whyde you suggest it earlier?
And no, I didn't realize its not neccasary. I'm pretty new to SC2 editor, and coming from AoE2 editor i'v got some bad habits =)
The way i see it is that, if you want to link one trigger to another, and you want it to consider its event, than you need to turn the trigger on. and that's what i did. I had one trigger activate once a unit enters the region, and then in the actions i had it run the another trigger, which creates units followed by turn current trigger on.
edit: oh also, i had question relating to regions. Is there a way to link multiple regions, for example, in my case if a unit enters lets say any one of four regions, then it should start spawning units.
edit:
@caspersc:
thanks for the alternate solution
One region, but the other regions still exist, so you can check them. You need to create a dummie blank region to add the other 4. Don't add the regions to one of them.
Dummie Region: Use Add Region to Region to add region 1, 2, 3, and 4.
Event: unit enters Dummie Region.
Then you can do some If Activator Unit in Region 1, 2, 3 or 4.
Hi, so basically, when a unit enters a specific region, it spawns units at another region every 15 seconds. I tried to make these as two separate triggers, so have one trigger create units every 15 seconds, and the other one call this trigger when a unit enters the area. But when you call a trigger, it ignores its event, so in my case it only spawns the units once. Any ideas?
Events
Timer - Every 15 seconds of Game Time
Condition
(Unit type of (Unit 1 from (Any units in DesiredRegion owned by player X matching with at most Any Amount)))==DesiredUnit
Action
Create Unit at DesiredPoint
Turn current trigger on
Turn Trigger Off/On
Riley, even when you turn the trigger on again, the unit wouldn't be considered reentering the region, as its already inside it. He wants a contnious spawn so there isn't a need to set patrol on the units to keep spawninng them
Global Boolean SpawnMarine=false
______________________________________________________
MarineEnterSpawner P 1
Events
Unit - Any Unit Enters Player1SpawnerSpawn
Local Variables
Conditions
(Unit type of (Triggering unit)) == MarineSpawner
Actions
Variable - Set SpawnMarine P 1 = true
Trigger - Turn (Current trigger) On
_________________________________________________________
MarineLeavesSpawner P 1
Events
Unit - Any Unit Leaves Player1SpawnerSpawn
Local Variables
Conditions
(Unit type of (Triggering unit)) == MarineSpawner
Actions
Variable - Set SpawnMarine P 1 = false
Trigger - Turn (Current trigger) On
_____________________________________________________________
MarineSpawning P 1
Events
Timer - Every 0.1 seconds of Game Time
Local Variables
Conditions
SpawnMarine P 1 == true
(Number of Living units in (Any units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, Invulnerable, with at most Any
Amount)) < 48
Actions
Unit - Create 1 Marine for player 1 at SpawnUnitsPoint P1 using point facing (No Options)
Trigger - Turn (Current trigger) On
________________________________________________________________________________________
This is another way I was using earlier, its longer, but simpler
Not that I don't appreciate needless complexity but how about:
Unit Enters Region Turn Spawn Stuff On
Unit Leaves Region Turn Spawn Stuff Off
Spawn Stuff Every 15 seconds Create unit
Nothing wrong with your rube goldberg machine, though.
@RileyStarcraft:
actually thats eaxctly what i posted right above that
Just with values filled in
Actually, its got an extra population check in it, but one extra condition isnt what one calls a rube goldberg machine ;)
Also notice I put in another one two posts above that that only utilizes one trigger, but has fallible mechanisms (I.E. if theres a beacon or other unit in the region)
Thanks guys, the trigger on/off was the key.
@Feldeat: Go
You're right I was thrown off by the fact that you put Turn Current Trigger On at the end of every trigger and thought you were doing something else. You realize that there is absolutely no reason for doing that?
@RileyStarcraft:
Then whyde you suggest it earlier?
And no, I didn't realize its not neccasary. I'm pretty new to SC2 editor, and coming from AoE2 editor i'v got some bad habits =)
So a trigger event will continously set off?
Overkill guys, only need one trigger.
The way i see it is that, if you want to link one trigger to another, and you want it to consider its event, than you need to turn the trigger on. and that's what i did. I had one trigger activate once a unit enters the region, and then in the actions i had it run the another trigger, which creates units followed by turn current trigger on.
edit: oh also, i had question relating to regions. Is there a way to link multiple regions, for example, in my case if a unit enters lets say any one of four regions, then it should start spawning units.
edit: @caspersc: thanks for the alternate solution
@insom89: Go
Use Add Region to Region and create a region with the four regions you need. Use that region (can be a dummie region) for the Event.
@fr0d0b0ls0n: Go
oh okay, will it be one region or can i still distinguish between the smaller ones?
@insom89: Go
One region, but the other regions still exist, so you can check them. You need to create a dummie blank region to add the other 4. Don't add the regions to one of them.
Dummie Region: Use Add Region to Region to add region 1, 2, 3, and 4.
Event: unit enters Dummie Region.
Then you can do some If Activator Unit in Region 1, 2, 3 or 4.
i c thanks!