HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Disable/Enable User Control

07-27-2004, 10:33 AM#1
th15
I've been trying to use the "Cinematic - Disable user control" Trigger action as part of my hero ability effects. After diabling user control, it waits 1 second then re-enables user control for owner of casting unit. For some reason this intermittently breaks down. Sometimes the player never receives control back. Does anyone know what causes this to fess up?
07-27-2004, 04:16 PM#2
aaero
I'm not sure this would be your problem, but I figured I would toss out the suggestion. I've had problems with any of the Event Response functions in triggers that have the Wait command. If I want to have a wait, I usually make a variable and assign the variable to whatever unit I will be working with as soon as the spell is cast, and use that variable to refer to the unit from then on.

Like I said, not sure it'll help but I figured I would toss the idea out there.

-Aaero
07-27-2004, 11:38 PM#3
th15
Bleh, local variables are a pain in the ass to write custom script (well not really; I'm just lazy). In anycase all the other event responses work fine. Hell, I've even got a timed trigger loop that references "Casting unit" without any trouble.
07-28-2004, 04:52 AM#4
bile
i've also noticed this problem with waits with the "target of ability being cast". There appears to be a bug that won't keep that target of ability being cast. if you add a wait, it won't execute the actions after it because the target no long becomes a target of that ability. Probably because the ability has been cast, thus it no longer has a target. AFAIK you can only have 1 target per ability or something like that.

I attempted this before with making a unit invulnerable for a few seconds. to get it to work you would have to set that unit of target being cast to a variable.
07-28-2004, 07:00 AM#5
Ceo
Also, if two units cast the same spell, and there's a wait, won't the second spell write over the previous "casting unit"?
07-28-2004, 07:15 AM#6
Panto
In this situation, yes, I think storing the casting unit to a local would be the best way to keep it from getting overwritten by the next trigger.
07-28-2004, 10:07 AM#7
Anitarf
Yeah, some event responses work as local variables, and some as global. "Casting unit" is a global thingy, and can get overwriten by any spells cast during a wait. However, "summoning unit" is a local variable, so if you can base your spell on a summon spell (if you have all effects triggered, then, you can base it on anything), you can use "summoning unit" after a wait with no problems.
07-28-2004, 11:48 PM#8
th15
But the strange thing is that I have a timed loop trigger that uses "Casting unit". This trigger is run after a spell is cast and constantly re-runs itself every 0.1 seconds and the "casting unit" reference works fine. Much strangeness. Oh well, guess I'll just use a local...