HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

random questions

10-23-2008, 09:06 AM#1
grim001
1.) Is there any known way to make a unit unselectable (even with drag click) without killing it or giving it locust?

2.) Is there any known way to bring a unit back to life without a dummy caster using Resurrection on it?

3.) Is there any known way to detect the instant something is selected? EVENT_PLAYER_UNIT_SELECTED has a delay.

4.) Is there any known way to suspend or prevent the decay of a unit? Setting decay time to 1,000,000,000 causes it to decay in 10 or 15 minutes, so it appears to be hard-capped. Pausing the unit doesn't help. UnitSuspendDecay should do it, but it seems to do nothing at all.
10-23-2008, 09:25 AM#2
dead_or_alivex
1. If by "killing it" you mean the CreateCorpse() function, then I don't know of any other way.

2. Reincarnation, or damage reduction via triggers (i.e. workaround), maybe?

4. Strange. I've used UnitSuspendDecay() before, and it worked.
10-23-2008, 09:52 AM#3
grim001
Seems that you have to use UnitSuspendDecay after the decay has already started, i.e. you can't just use KillUnit() then immediately suspend the decay.

Well that solves most of my problems, but if anyone knows a way to instantly detect unit selection that would be nice.
10-23-2008, 10:14 AM#4
Tide-Arc Ephemera
Quote:
Originally Posted by grim001
Well that solves most of my problems, but if anyone knows a way to instantly detect unit selection that would be nice.

I don't think there's a real way to do that, since local players do it and it kinda has to be synchronized first...
10-23-2008, 10:23 AM#5
grim001
Quote:
Originally Posted by Tide-Arc Ephemera
I don't think there's a real way to do that, since local players do it and it kinda has to be synchronized first...

Good point. That rules out doing it based on anything related to triggers.

It can be detected locally a lot more quickly by doing a periodic check, but even if you deselect a unit 60 times a second you can still briefly select it.
10-24-2008, 07:42 AM#6
Pyrogasm
I assume Locust + Chaos morph doesn't suit your purposes?

Edit: And a fast (one 0.01 timer isn't going to kill you) periodic check is the only way I can think of getting the near instant a unit is selected.