FileFront Forums

FileFront Forums (http://forums.filefront.com/)
-   WC3 Modding, Mapping and Editing (http://forums.filefront.com/wc3-modding-mapping-editing-90/)
-   -   Trouble with custom spell activation (http://forums.filefront.com/wc3-modding-mapping-editing/249120-trouble-custom-spell-activation.html)

unauthorized April 5th, 2006 08:24 AM

Trouble with custom spell activation
 
Ok here's what I do :
Quote:

MagmaShieldAddArmor
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Magma Shield (custom)
Actions
Unit - Create 1 ScapeGoat (no auto remove) for Neutral Passive at (Random point in (Region centered at (Position of (Triggering unit)) with size (200.00, 200.00))) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add DebugAddArmor(1-15) to (Last created unit)
For each (Integer A) from 1 to ((Level of Magma Shield (custom) for (Casting unit)) - 1), do (Actions)
Loop - Actions
Unit - Increase level of DebugAddArmor(1-15) for (Last created unit)
<loop ends here>
Wait 0.10 seconds
Unit - Order (Last created unit) to Human Priest - Inner Fire (Triggering unit)
Not too pretty isn't it? :)
So what I am trying to do is make an improved version of Immolation with armor increasment/level. When the Magma Shield is activated the armor is added correctly but very soon after both effects are lost and my Magma Shield is shown as inactive. My deactivation triger is not made yet and I see no reason for such a thing to happen.
Magma Shield is based on immolation and DebugAddArmor is based on Inner Fire.
I would realy appreciate if you could tell me where am I going wrong.

Eleandor April 5th, 2006 01:51 PM

Re: Trouble with custom spell activation
 
so you're sure it's not marked inactive because you ran out of mana, or went past the "minimum mana" immolation needs?

unauthorized April 6th, 2006 01:36 AM

Re: Trouble with custom spell activation
 
Yes I am sure I checked all the basic can-go-wrong things. Furthermore the AddArmor spell would still not disappear when the mana reaches 0 since it should last forever until removed and I as I said there is no trigger to remove it. The spell requires 0.5 mana in level 1 and my caster had 20/30 down by the 10mp activation requirement.

InnerGemini April 10th, 2006 02:14 AM

Re: Trouble with custom spell activation
 
Hmm, I did a very quick and very dirty check to see how this would work, and it seemed to work fine when I did it. The only thing I changed in your triggerwork is I changed the event to 'Unit - A unit Starts the effect of an ability'. I had both immolation and the inner fire buff at the same time, and since i didn't set up a counter-trigger, inner fire stayed on after I turned off immolation.

The only thing I could suggest is to do as Eleandor suggested, again if need be. Check all the stats, inner fire's duration, on how much buffer mana needed, mana drained, so on and so on.

Also, check to see if any other triggers you have may be negating or taking off your effects. Making a dummy map with just the hero and the ability (and related triggerwork) would be a good way to test for that.

Wish I could be of more help. Everything you outlined looks perfect from a technical standpoint, so I can't possibly envision the trigger being the problem. If you want more details on what exactly I did to make my test work, drop a line and ask.

Good luck and peace out.

unauthorized April 12th, 2006 10:09 AM

Re: Trouble with custom spell activation
 
I tried to copy the trigger and related spells to an other map and it worked. So simple elimination left the triggers as the only possible source of my bug. I deleted all triggers with the exception of the one above (after making a backup of the map :) ) and it worked! All that remains is to disable each and start enableing until I find the troublemaker.
Thanks for help. It would have taken me forever to find this bug.

Peace.

InnerGemini April 13th, 2006 12:07 AM

Re: Trouble with custom spell activation
 
No prob, glad to help when I can. Just remember the theory of Occam's Razor:
Quote:

entia non sunt multiplicanda praeter necessitatem
It essentially means that the simplest answer is most often the correct one.

Good luck and peace out.


All times are GMT -7.

Powered by vBulletin®
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.