HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Some Basic Triggering questions

01-18-2006, 04:41 AM#1
kumoblade
Hello, I'm new to the forums.

I'm seeking a little help.

I'm currently trying to work on a Hero Arena for my friends and I.

Unfortunately, Im' stuck on something very basic that I'm sure ever trigger, spell maker knows about.

And thats adding and removing special effects and animation effects.

The spell I'm working on for my Current Character, Fei Serumen, is a Spell called "Tenebrous Form."

A toggle power that is easily manipulated through The Mana Shield Ability.

The problem I'm having though is that its a Toggle ability. And I don't know how to remove special effects from a toggle ability because you're not finishing casting nor finishing channeling. You click to deactivate...

I'm new to Triggering in General, and I'm still experimenting. I'm right brained, unfortunately, so I have to experience things for myself to understand them whole heartedly.

Anyways, waht happens is this. I click the mana shield trigger/Tenebrous Form.

I have a trigger setup in when beginning the effect of an ability, ability = Tenebrous Form, Animation = Set Vertex coloring of triggering unit to 0% 0% 0% and 27% Transparency.

I also Create a Special Effect on both hands using the Banish effect. (green glowing with black tendrils, looks very fitting)

But for the life of me, I dont' know how to remove any of them when i turn off Mana Shield/Tenebrous form.

If I could get any assistance, it would be most appreciated, and I will credit you once I (hopefully) finish my map.

Its going to take a while though.
01-18-2006, 08:18 AM#2
qwertyui
Similarily to immolation question in other thread, try to detect order to untoggle the ability given to hero.
01-18-2006, 07:28 PM#3
mmx2000
Yeah, check out my question in this thread: http://wc3campaigns.com/showthread.php?t=79420

It seems the best way to do it is detect when the Unit is given the order string "Unmanashield" or w/e the turn off command is. Its explained much better in the other thread^^;
01-18-2006, 07:53 PM#4
Daminon
Quote:
Originally Posted by kumoblade
I also Create a Special Effect on both hands using the Banish effect. (green glowing with black tendrils, looks very fitting)

But for the life of me, I dont' know how to remove any of them when i turn off Mana Shield/Tenebrous form.
Its going to take a while though.
You have to store the effects and remove them when the deactivation order is registered.
01-18-2006, 08:33 PM#5
mmx2000
Meaning that you'd probably want to use local variables so that more than 1 unit at a time can be under the influence of the trigger. If you don't know how to do that just search for local variables and you'll find an easy way to do it with Custom Scripts through the GUI.
01-18-2006, 09:36 PM#6
Earth-Fury
Quote:
Originally Posted by mmx2000
Meaning that you'd probably want to use local variables so that more than 1 unit at a time can be under the influence of the trigger. If you don't know how to do that just search for local variables and you'll find an easy way to do it with Custom Scripts through the GUI.

you cant use local variables.

local variables are variables local to a function. a trigger consists (mainly) of 3 functions: the conditions function (returns bool) the actions function, and the initialization function. (this function creates the trigger, adds the conditions, and adds the events.)

now, 2 seperate triggers must be used: one to activate the ability, one to deactivate the ability. (2 triggers with 2 seperate action functions) thus, one cannot use local variables.

now, if you will only have one hero of this type in your map, then create a variable array (of the special effect type) when you add the special effects to the hero, set your variable to "last crated special effect" right after you create one.

then, when you wish to take away the effect, simply destroy the special effects that you have created and stored in the variable.
01-18-2006, 10:45 PM#7
mmx2000
If it's multi-instanced in the map, you can actually put it all inside one trigger - rather than putting the condition for the Order in the CONDITIONS part of the GUI, you can nest everything inside two separate If-then-multiple-actions to use locals, I'd think...

But it sounds like you only need 1 unit to have that, so nevermind any of this^^;;
01-19-2006, 01:41 AM#8
Immoralis
you know some abilites have thier own special buffs thing so you dont always need to make sfx's.
01-19-2006, 01:43 AM#9
Earth-Fury
Quote:
Originally Posted by mmx2000
If it's multi-instanced in the map, you can actually put it all inside one trigger - rather than putting the condition for the Order in the CONDITIONS part of the GUI, you can nest everything inside two separate If-then-multiple-actions to use locals, I'd think...

But it sounds like you only need 1 unit to have that, so nevermind any of this^^;;

but once the trigger has run for turning it on, the local variables values cease to exist. thus, when the trigger runs again, you will be destroying empty variables.
01-19-2006, 01:29 PM#10
kumoblade
actually,

I already got it working after looking around a bit.

unfortunately, i can't get it to deactivate the special effects when the Hero's mana reaches 0 and the shield is automatically removed but is NOT detected as a manashieldoff.
01-19-2006, 01:38 PM#11
qwertyui
There is an event, Unit-Mana, which basically allows you to detect when hero has low mana.
Just add this event to your manashieldoff trigger.
01-19-2006, 03:31 PM#12
Vexorian
Instead keep checking until the buff is not present in the unit then remove the effect