HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Can't make it work =/

07-17-2006, 07:50 PM#1
Fallenzeca
Here I am again ( yea yea i know I will get better but really, tried everything
I can find)

Geez been searching this forum for spawn triggers but no one unfortunately
fits my type of spawn trigger( of what I've seen )

Trigger idea:
A unit enters a location, then creeps spawn. If the unit stays in the location
the creeps will keep spawning but if the unit leaves, the creeps stop spawning
until another unit enters location.

Think I got everything there.

Will appreciate all help, yet again this forum rocks
07-17-2006, 08:27 PM#2
Rising_Dusk
Well if you're attempting to only create creeps when a unit is in a region, yes that would work.

Normally for most creep spawns in most maps they do a periodic timer that has a condition that checks
if the unit spawner is alive, then spawns creeps if it is.
07-17-2006, 08:28 PM#3
Fireeye
You do it with a stating a timer when a unit enters the rect and pause the timer when it leaves.
I attached an example.
Attached Files
File type: w3mTimer.w3m (14.4 KB)
07-17-2006, 08:57 PM#4
Fallenzeca
oh, forgot one thing >.< now that Rising Dusk mentioned it, the spawns should also only spawn when all the creeps in the location is dead.
I've tried making a trigger, but it doesnt work perfect, it got some flaws.
Trigger:
Trigger:
SpawnRats1
Collapse Events
Unit - A unit enters SpawnRookSmaRat <gen>
Collapse Conditions
(Unit-type of (Entering unit)) Equal to Adventurer
Collapse Actions
Unit - Create 5 Rat for Player 12 (Brown) at (Random point in SpawnRookSmaRat <gen>) facing Default building facing degrees
Trigger - Turn off SpawnRats1 <gen>
This trigger works (got 3 different triggers otherwise i think it won't work)
Trigger2:
Trigger:
ReviveRookRats
Collapse Events
Unit - A unit owned by Player 12 (Brown) Dies
Collapse Conditions
((Unit-type of (Dying unit)) Equal to Rat) and ((Unit-type of (Killing unit)) Equal to Adventurer)
Collapse Actions
Wait 17.00 seconds
Unit - Create 1 Rat for Player 12 (Brown) at (Random point in SpawnRookSmaRat <gen>) facing Default building facing degrees
This one got the flaws i think.
Trigger3:
Trigger:
BlockSpawnRats1
Collapse Events
Unit - A unit leaves SpawnRookSmaRat <gen>
Collapse Conditions
(Unit-type of (Leaving unit)) Equal to Adventurer
Collapse Actions
Trigger - Turn off ReviveRookRats <gen>
Seems like this one won't execute perfectly either

Appreciate all help
07-17-2006, 10:27 PM#5
Rising_Dusk
Look into a periodic trigger.
I havent had a chance, but check out Fireeye's test map, he may explain the periodic bit to you.

Basically it should look like this:
Trigger:
SpawnCrap
Collapse Events
Time - Every 33.0 seconds
Collapse Conditions
(YourUnitSpawner is alive) equal to true
Collapse Actions
Create 2 SomeUnits at SomeLocation for player SomeCreepOwningPlayer
07-18-2006, 04:41 PM#6
Fallenzeca
Thanks guys, didnt have time to try fire eyes map until now but its great.
07-18-2006, 05:36 PM#7
Fallenzeca
Trigger:
Fibula PS turn off
Collapse Events
Unit - A unit enters Fibula poison spider 1 <gen>
Collapse Conditions
(Number of units in (Units in Fibula poison spider 1 <gen> owned by Player 12 (Brown))) Greater than or equal to 4
Collapse Actions
Countdown Timer - Pause Timer[1]

Will the timer start again if a unit enters the region again and the condition
isn't fulfilled?
07-18-2006, 05:48 PM#8
Fireeye
Uhm..., why did you write the pause trigger?
When you want to know if the timer will be runned again, you should post the start trigger.
07-18-2006, 05:56 PM#9
Fallenzeca
Oh sry >.<

Trigger:
Fibula PS initialization
Collapse Events
Unit - A unit enters Fibula poison spider 1 <gen>
Collapse Conditions
(Owner of (Entering unit)) Equal to (Random player from (All allies of Player 1 (Red)))
Collapse Actions
Set Timer[1] = (Expiring timer)
Countdown Timer - Start Timer[1] as a Repeating timer that will expire in 2.00 seconds
trigger2:
Trigger:
Fibula PS spawn
Collapse Events
Time - Timer[1] expires
Conditions
Collapse Actions
Unit - Create 1 Poison Spider for Player 12 (Brown) at (Random point in Fibula poison spider 1 <gen>) facing 0.00 degrees
trigger3:
Trigger:
Fibula PS turn off
Collapse Events
Unit - A unit enters Fibula poison spider 1 <gen>
Collapse Conditions
(Number of units in (Units in Fibula poison spider 1 <gen> owned by Player 12 (Brown))) Greater than or equal to 4
Collapse Actions
Countdown Timer - Pause Timer[1]
but these triggers won't work either =/
07-18-2006, 06:26 PM#10
Fireeye
This set Timer[1] is un-needed and the turn off trigger can not work, because a unit have to enter and in that moment trigger 1 will also be runned.
As i can see you want only to create Units when there are less than 5 units, right?
I'll rewrite the triggers
Trigger 1:
Trigger:
Collapse Events
Unit - A unit enters Fibula poison spider 1 <gen>
Collapse Conditions
(Owner of (Entering unit) is an ally of Player 1 (Red)) Equal to True
Collapse Actions
Countdown Timer - Start Timer as a Repeating timer that will expire in 2.00 seconds
Trigger 2:
Trigger:
Collapse Events
Time - Timer expires
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then - Actions) else do (Else - Actions)
Collapse If - Conditions
MaxUnits less than 5
Collapse Then - Actions
Unit - Create 1 Poison Spider for Player 12 (Brown) at (Random point in Fibula poison spider 1 <gen>) facing 0.00 degrees
Set MaxUnits = MaxUnits + 1
Unit Group - Add (Last created unit) to (UnitGroup)
Collapse Else - Actions
Do nothing
Trigger 3:
Trigger:
Collapse Events
Unit - A Unit dies
Collapse Conditions
(Unit-Type of (Dying Unit)) equal to Poison Spider
((Dying Unit) is in UnitGroup) Equal to True
Collapse Actions
Set MaxUnits = MaxUnits - 1
Trigger 4:
Trigger:
Unit - A unit leaves Fibula poison spider 1 <gen>
Collapse Conditions
(Owner of (Leaving unit) is an ally of Player 1 (Red)) Equal to True
Collapse Actions
Countdown Timer - Pause Timer
I hope i didn't forgot anything
07-18-2006, 08:24 PM#11
Fallenzeca
Wow, really nice and thx alot. Thats the biggest flaw in my map. Sure you got everything there ;) +rep definitely