Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Need help making stun ability
Need help making stun ability
Mar 4 2010, 9:03 pm
By: PoisonHunter  

Mar 4 2010, 9:03 pm PoisonHunter Post #1



Hey there. I am currently working on a 2v2 Co-Op/AoS-like map that is very basic and relies more on communication than quick reflexes. There are only 2 different units, and each unit has 2 of their own unique abilities.

For one of my 2 choices I am using a ghost, the other being a marine.

I want my ghost to have a stun ability; I am thinking of a basic flashbang-like ability that lasts 2 seconds, without blinding the entire screen of players.

As of now, my trigger goes like this.


Quote
Sharpshooter (aka ghost) stun ability
Players
Player X

Conditions
Player X controls 1 Zealot
Player X controls 1 Sharpshooter (ghost)

Actions
create 6 Protoss Observer at (Location) for player 7
kill all Protoss Observer at (Location) for player 7


the trigger posted doesn't contain all the actions, but it has the visual aspect in it.

I want the trigger to stun all units within the area for 2 seconds, both enemies and allies.

I would very much appreciate it if someone could help me out with this.



None.

Mar 4 2010, 9:11 pm rockz Post #2

ᴄʜᴇᴇsᴇ ɪᴛ!

to stun a unit, move it to a location placed outside the map constantly with hyper triggers running.

I suggest you set a DC to 24 in that trigger, then in another trigger, always subtract 1 from that DC. In a third trigger, if the DC is greater than 1, move the unit to the out of bounds location.

If you don't understand the concept, please search the wiki and the stickies for general mapmaking techniques. In particular is the "Death Counter" and there's probably something about stunning units too.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Mar 4 2010, 9:20 pm PoisonHunter Post #3



Quote from rockz
to stun a unit, move it to a location placed outside the map constantly with hyper triggers running.

I suggest you set a DC to 24 in that trigger, then in another trigger, always subtract 1 from that DC. In a third trigger, if the DC is greater than 1, move the unit to the out of bounds location.

If you don't understand the concept, please search the wiki and the stickies for general mapmaking techniques. In particular is the "Death Counter" and there's probably something about stunning units too.

Thank you very much. I was hoping that I wouldn't have to use hyper triggers though ><.



None.

Mar 4 2010, 9:28 pm NudeRaider Post #4

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

The problem with rockz solution is that it makes the affected units invincible to attacks and targeted spells.

2 other solutions are
- giving the units to a neutral player which I'd recommend if you have enough spare players. You'd have 1 neutral player for each player that can get stunned.
- order the units to themselves. This requires to reserve one 1x1 pixel location per unit to be stunned.

The implementations should be pretty obvious, but if not, don't hesitate to ask.

Quote from PoisonHunter
Thank you very much. I was hoping that I wouldn't have to use hyper triggers though ><.
There's no reason not to. It's a simple set of triggers that makes mapping much more efficient if you follow a few basic rules (mainly how to a avoid wait blocks).
However if you insist on not using them, the give to neutral solution doesn't require them.




Mar 4 2010, 10:08 pm Lanthanide Post #5



Problem with moving units to themselves, is that with fast clicking you can still manuever the units around. On Fastest speed this isn't too much, but on slower game speeds it is easier to get the unit to move around.

For a short duration like 2 seconds this probably isn't a big deal, but for longer periods of time (I use a 16 second freeze in my map), the player can easily make their unit wiggle around; it's easier with air units. The 'move to invalid location' method isn't perfect in this regard either, but it's greatly minimised - I think the only unit I managed to nudge around at all was a scourge.



None.

Mar 4 2010, 10:27 pm PoisonHunter Post #6



Quote from NudeRaider
The problem with rockz solution is that it makes the affected units invincible to attacks and targeted spells.

2 other solutions are
- giving the units to a neutral player which I'd recommend if you have enough spare players. You'd have 1 neutral player for each player that can get stunned.
- order the units to themselves. This requires to reserve one 1x1 pixel location per unit to be stunned.

The implementations should be pretty obvious, but if not, don't hesitate to ask.

Quote from PoisonHunter
Thank you very much. I was hoping that I wouldn't have to use hyper triggers though ><.
There's no reason not to. It's a simple set of triggers that makes mapping much more efficient if you follow a few basic rules (mainly how to a avoid wait blocks).
However if you insist on not using them, the give to neutral solution doesn't require them.

Quote from Lanthanide
Problem with moving units to themselves, is that with fast clicking you can still manuever the units around. On Fastest speed this isn't too much, but on slower game speeds it is easier to get the unit to move around. For a short duration like 2 seconds this probably isn't a big deal, but for longer periods of time (I use a 16 second freeze in my map), the player can easily make their unit wiggle around; it's easier with air units. The 'move to invalid location' method isn't perfect in this regard either, but it's greatly minimised - I think the only unit I managed to nudge around at all was a scourge.

@NudeRaider - Well the reason I don't want to use hyper triggers is because I am very unfamiliar with them.
thank you for the tip, I think I will use that in my map (the give to neutral one)

@Lanthanide - I think he means "order unit to move to (location)", not "move unit to (location)". If you're talking about the 1st thing, then disregard my comment.



None.

Mar 4 2010, 10:43 pm rockz Post #7

ᴄʜᴇᴇsᴇ ɪᴛ!

Okay, I was mistaken in my original thought. Nude is correct.

However, here's the improvement: If a player is stunned, don't center their location anymore. Make it stay in place. That way, the unit, even if it tries to move, will always be moved back to the original position. If it moves at all, and the location is re-centered, it will have moved just enough to sometimes be out of range.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Mar 4 2010, 11:15 pm PoisonHunter Post #8



Quote from rockz
Okay, I was mistaken in my original thought. Nude is correct.

However, here's the improvement: If a player is stunned, don't center their location anymore. Make it stay in place. That way, the unit, even if it tries to move, will always be moved back to the original position. If it moves at all, and the location is re-centered, it will have moved just enough to sometimes be out of range.

This is very helpful to me. I was just testing out the trigger and i found that if my unit went out of range, as you stated, he would stay neutral and wouldn't be given back to me.

Hopefully I can fix the bug with your suggestion

Edit: Your suggestion has fixed the glitch. That saved me a lot of time; thank you very much.

Post has been edited 1 time(s), last time on Mar 4 2010, 11:23 pm by PoisonHunter.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[12:34 pm]
NudeRaider -- curiosity kills the cat!
[06:18 am]
Sylph-Of-Space -- No complaints here, i'm just curious!
[11:05 pm]
Ultraviolet -- :wob:
[2024-5-18. : 3:55 pm]
Zoan -- :wob:
[2024-5-18. : 10:34 am]
NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
[2024-5-18. : 3:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
[2024-5-17. : 4:35 am]
Ultraviolet -- mud, meet my friend, the stick
Please log in to shout.


Members Online: Roy, belzussmch, NudeRaider