Staredit Network

Staredit Network -> UMS Assistance -> a burrow counter
Report, edit, etc...Posted by Zwo on 2007-01-04 at 09:45:21
I want it so that when i burrow a unit (in my case a hydralisk), it adds 1 to a deathcounter(terran academy)

i've been trying to trigger this for some time, but every time it burrows, it waits a few sec until it unburrows, and it adds more than 1 death to terran academy.
i've tried to fix this using waits and switches, but it's no use.

i used a burrow detection tutorial to do this.
I've got something like this:

Trigger
Conditions:
¤ player 1 brings at least 1 terran civilian to "f 2"
¤ switch 1 is cleared
Actions:
¤ set switch 1
¤ move all terran civilian for player 1 at "f 2" to "f 1"
¤ issue order to all hydralisk owned by player 1 at "f 2" to "f 2"
¤ modify death counts for player 1: add 1 for terran academy
¤ preserve trigger

Trigger
Conditions:
¤ player 1 brings exactly 0 terran civilian to "f 2"
¤ switch 1 is set
Actions:
¤ clear switch 1
¤ wait 1000ms
¤ preserve trigger

Trigger
Conditions:
¤ switch 1 is cleared
Actions:
¤ move all civilian for player 1 at "f 1" to f 2"
¤ preserve trigger


the terran civilians are located at "f 1"
the hydralisk is located on a 1x1 block located at "f 2"
Report, edit, etc...Posted by Falkoner on 2007-01-04 at 12:01:04
Hmm, you are supposed to use one of those tiny dot locations that you can make with starforge and SCM, then you can say if the civilian isnt there, since the hydra should push him off, stop adding death counters and remove the civilian, but this would work fast enough if you were using hypertriggers...
Report, edit, etc...Posted by Mp)Blu on 2007-01-04 at 13:17:31
QUOTE(Falkoner @ Jan 4 2007, 11:01 AM)
Hmm, you are supposed to use one of those tiny dot locations that you can make with starforge and SCM, then you can say if the civilian isnt there, since the hydra should push him off, stop adding death counters and remove the civilian, but this would work fast enough if you were using hypertriggers...
[right][snapback]609843[/snapback][/right]

I know this is off topic but you can also make a small location using x-tra. Just drag one of the corners to the middle.
Report, edit, etc...Posted by Falkoner on 2007-01-04 at 13:39:37
Oh, I didn't know that, thx, also, I haven't tested out my idea, but it should work, although it might have a problem with moving the hydra as well.
Report, edit, etc...Posted by Zwo on 2007-01-05 at 09:37:57
QUOTE(Falkoner @ Jan 4 2007, 06:01 PM)
Hmm, you are supposed to use one of those tiny dot locations that you can make with starforge and SCM, then you can say if the civilian isnt there, since the hydra should push him off, stop adding death counters and remove the civilian, but this would work fast enough if you were using hypertriggers...
[right][snapback]609843[/snapback][/right]


My hydralisk is located on a 1x1 island, so the civilian can't be pushed off.
And i am using hypertriggers.


What happens in my map is the following:

When i burrow the hydralisk, a civilian is moved on top of it. This adds 1 to the deathcounter.
The civilian is moved to "f 1", the hydralisk is unburrowing.
And now here's the problem, while the hydralisk is unburrowing, the civilian at "f 1" is moved back to the hydralisk. And it adds 1 to the deathcounter again.

So when i burrow my hydralisk, more than 1 is added to the deathcounter.
Report, edit, etc...Posted by LethaL on 2007-01-05 at 11:39:24
Make the location smaller than 1x1. I use burrow detection in a small map of mine, try this:

Locations
F1: Location where the civilians start off
F2: Location ALWAYS centered on the Hydralisk
F3: 1x1 location covering the whole 'island' the Hydralisk is on

Trigger
Conditions:
¤ Always
Actions:
¤ Move all Terran Civilian owned by Player 1 at F1 to F2
¤ Preserve Trigger



Trigger
Conditions:
¤ Player 1 brings exactly 0 Terran Civilian to F2
¤ Player 1 brings exactly 1 Terran Civilian to F3
Actions:
¤ Move all Terran Civilian owned by Player 1 at F3 to F1
¤ Preserve Trigger


Trigger
Players:
¤ Human Player
Conditions:
¤ Player 1 brings exactly 1 Terran Civilian to F3
¤ Switch 1 is Cleared
Actions:
¤ Modify death counts for Player 1: add 1 for Terran Academy
¤ Set Switch 1
¤ Preserve Trigger


Trigger
Players:
¤ Human Player
Conditions:
¤ Switch 1 is Set
Actions:
¤ Issue order for all Zerg Hydralisk owned by Player 1 at F3 move to F3
¤ Clear Switch 1
¤ Preserve Trigger


I'm not entirely sure if it'll work but I believe it should. The civilian is always moved to F3 (SMALL location centered on Hydralisk) but can only be there when the Hydralisk is burrowed. When the Hydralisk burrows, the death count goes up 1 and a switch is set. When the switch is set, the Hydralisk unburrows and the Civilian is pushed off F3 and moved back to F1 until the Hydralisk burrows again.

Edit: Fixed broken triggers.
Report, edit, etc...Posted by Zwo on 2007-01-05 at 12:39:53
That might work, but the hydralisk is located on a 1x1 sized island. When the hydralisk unburrows, the civilian won't be pushed off.

I've fixed my problem by instead of unburrowing the hydralisk, remove it and recreate it at the same place. By doing so the civilian can't be moved back.

[Thread can be closed now]
Report, edit, etc...Posted by LethaL on 2007-01-05 at 13:33:51
If you made a location SMALLER than 1x1 (can be done in SCM Draft 2) the Civilian would be pushed off, you'd just need a third location.

Also, you can close your own threads. wink.gif
Next Page (1)