Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] How to trigger effective stuns
[SOLVED] How to trigger effective stuns
This topic is locked. You can no longer write replies here.
Nov 20 2011, 1:42 pm
By: MetalGear  

Nov 20 2011, 1:42 pm MetalGear Post #1



Okay so I want to implement a system that stuns units. Previously in the past, I've simply preserved a 'order to location' trigger, and it has worked just fine. However, in my new map, I'm using a Jim Raynor Vulture unit (with the speed upgrade), and it's so fast that if you spam click, you can actually move your unit despite the constant "order to" triggers.

Now I know a few of you may think, "Ah ha! Just use the 'move unit to location' trigger", but this is problematic because it means other units won't be able to attack the unit.

There's an idea I had to resolve this, but it is also problematic, because it involves giving the unit to player 12 during its stun duration so players won't be able to order the unit. The problem with this, is that it can be extremely annoying having to re-select your unit, and it can mess hotkeys up.

I was wondering if anyone has any suggestions as to how I could get around this dilemma?

Thanks in advance :)



None.

Nov 20 2011, 2:03 pm JaFF Post #2



I'm very rusty at this now but I'd say those are all your most robust methods (assuming you're not using VHP). You could use order your stunned units move back to their original positions constantly for most unit types and for the really fast ones you can have an inverted location on them that detects if they're trying to move too hard. If they are, either give the unit to P12 (but give him vision of the area via something like a map revealer or a constantly created and removed unit) and notify the player not to do that again OR just move the unit back to it's location (running the risk of the players realising that it actually reduces the probability of being attacked by enemies).



None.

Nov 20 2011, 2:36 pm Azrael Post #3



I would have to say the best method would be continually ordering the unit to move back to its location, and if it gets outside a certain range from that location via spam clicking, giving the unit to P12 to force it to stay.

It may be annoying for the player, but they are causing it themselves by spam clicking. It'll only have to happen once or twice before they realize trying to spam move is a futile effort and not do it anymore.




Nov 20 2011, 2:48 pm MetalGear Post #4



Quote
continually ordering the unit to move back to its location, and if it gets outside a certain range from that location via spam clicking, giving the unit to P12 to force it to stay

Okay I may just do that. Alternatively, I could use Jaff's inverted location idea, and simply sustain the duration of the stun each time the unit moves, possibly with a text message that warns the player "spamming whilst stunned will sustain duration of stun".

Thanks fellas.



None.

Nov 20 2011, 3:15 pm NudeRaider Post #5

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Constantly moving a burrowed unit under the vulture might further improve its unresponsiveness. I haven't tested this though.




Nov 20 2011, 3:20 pm MetalGear Post #6



Quote
Constantly moving a burrowed unit under the vulture might further improve its unresponsiveness. I haven't tested this though.

Good idea, I'll give it a shot later. You reckon a single Lurker should do the job?



None.

Nov 20 2011, 4:38 pm ClansAreForGays Post #7



yes




Nov 20 2011, 5:30 pm JaFF Post #8



Make sure the burrowed unit you're moving underneath your vulture is smaller in both dimensions, otherwise a vulture that's close to a wall might cause problems.



None.

Nov 20 2011, 5:52 pm MetalGear Post #9



Good thinking Jaff. And yes I'm pretty sure both units are exactly the same dimensions, 30x30. I'll have to check on that later but I'm quite sure.



None.

Nov 20 2011, 7:34 pm Sacrieur Post #10

Still Napping

The best way to stun a unit is to constantly try to move the unit to unplaceable terrain, like water.



None.

Nov 20 2011, 7:39 pm Oh_Man Post #11

Find Me On Discord (Brood War UMS Community & Staredit Network)

Quote from Sacrieur
The best way to stun a unit is to constantly try to move the unit to unplaceable terrain, like water.
Nah then it becomes unattackable (well you can attack, but it does no damage/way less damage) which is not what he wants.




Dec 19 2011, 8:51 am Vrael Post #12



I know this thread is sort of old now, but I realized I have a stun in my map which may be exactly what you're looking for. Essentially it's the following:

Trigger 1:
Conditions:
Stun DC is at least 1.
Actions:
Give all Target Unit owned by Current Player at Target Area to Player 8
preserve trigger

Trigger 2:
Conditions:
Stun DC is at least 1.
Actions:
Center Location labeled "Tiny" on Target Unit owned by Player 8 at Target Area
Give 1 Target Unit at "Tiny" owned by Player 8 to Current Player
Issue Order to Target Unit at "Tiny" move to "Tiny"
Preserve Trigger
Comment("Copy this trigger times the number of "Target Unit" possible in the area");

Conditions:
Stun DC is at least 1
Actions:
Subtract 1 Stun DC for CP
preserve
Comment: just the timer part of the stun


This works perfectly for me. There are some conditions on this however:
Player 8 or whichever player you use has to be a computer that isn't otherwise going to be in the battle or whatever. If player 8 commands some of the same unit types in the target area, the stunned units may get mixed up.
"Tiny" is a small location such that it will only contain 1 unit at a time, that way each trigger orders the units to move to where they already are.

When you get stunned, this method WILL de-select your unit, but it wont mess up hotkeys. I know because I use this exact method in my map and when I hold down the hotkey for the unit it selects it, but I can't move the unit no matter how much I spam click.

No burrowed units, no moving to unwalkable terrain, ect, enemy units will still be able to attack your unit but you wont be able to move it. This works on enemy computer units as well.



None.

Dec 19 2011, 9:20 am Lanthanide Post #13



Thanks, I'll probably use this in my Blood Pressure Marathon map.

I'd thought about giving the units to Neutral (as they'd retain your colour) but if there are 7 players in the game then there's no nice way to remember which units to give back to which players, especially if some players can sometimes control more than 1 unit (and of the same types controlled by other players). I probably would have eventually arrived at this solution, but good to not have to think about it now :)

Post has been edited 1 time(s), last time on Dec 19 2011, 10:08 am by Lanthanide.



None.

Dec 19 2011, 9:39 am Vrael Post #14



You can actually use the same computer (Player 8 in the example) to stun all 7 players at once if necessary, since in this method Player 8 only actually owns the unit for a brief period within a few consecutive triggers in 1 trigger cycle, as long as the triggers are in the right order you don't have to remember which units to give back to which players. Of course, its helpful if P8 is used for the sole purpose of abilities/spells ect so he wont have any units that interfere.

What I mean is if you change "Target Unit" to "Men", then copy the middle trigger times the max number of units stunned possible at once, then copy the whole set once for each players and make sure all the player triggers are properly grouped then it will work on any men in the target area, up to the initial number given to P8 in the first trigger. If you make this a force trigger then it'll automatically work for each player in the force without having to worry about units being given to the wrong player, as long as you use Current Player properly and don't invalidate any of the assumptions about P8 units not being in the target area to begin with.



None.

Dec 28 2011, 1:51 pm Gigins Post #15



Quote from MetalGear
Okay so I want to implement a system that stuns units. Previously in the past, I've simply preserved a 'order to location' trigger, and it has worked just fine. However, in my new map, I'm using a Jim Raynor Vulture unit (with the speed upgrade), and it's so fast that if you spam click, you can actually move your unit despite the constant "order to" triggers.

Now I know a few of you may think, "Ah ha! Just use the 'move unit to location' trigger", but this is problematic because it means other units won't be able to attack the unit.

There's an idea I had to resolve this, but it is also problematic, because it involves giving the unit to player 12 during its stun duration so players won't be able to order the unit. The problem with this, is that it can be extremely annoying having to re-select your unit, and it can mess hotkeys up.

I was wondering if anyone has any suggestions as to how I could get around this dilemma?

Thanks in advance :)
What do you mean by that? It either does or doesn't mess them up. It's not random for sure. I'm actually interested, does it?



None.

Dec 28 2011, 4:15 pm Azrael Post #16



Quote from Gigins
What do you mean by that? It either does or doesn't mess them up. It's not random for sure. I'm actually interested, does it?

It doesn't if the player owns the units again by the end of the same trigger cycle. Otherwise, yes it does.




Jan 9 2012, 7:22 am c(O.Oc) Post #17



Instead of a lurker, you could use an observer. Just make sure that the conditions are "remove unit at location" "create unit at location" "remove unit at location." If you do it this way, you'll never even see the observer, and the unit will slow down dramatically.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[07:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[06:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[03:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: jun3hong