HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Some advanced trigger problems...

01-08-2004, 04:51 AM#1
MonkY
Hi. I have curently two big problems. And i thought about so many ways to solve these, but all of them are not profesionall (they kinda look like "programming tricks" to me). Well, here they are:

1. Use triggers to recognize what level the spell is.
OK, here, i know it's easy to do them for summoning spells (using dummies)... but how about for Blizzard already created spells ? Is there a way to put in conditions of a trigger "If abbility is channeled... or when the unit start the effect of a spell - Then check if that spell level is.... - Else ?!?". I also tried using variables that are incremented anytime the unit is leveling up a spell... but that's becoming annoying when you have over 50 spells... and plus, those are buggy (ppl use Tome Of Retraining and you have to setup for all the spells what variable to reset... and so on).

2. Reward with triggers. Here is the hard part. Ok, it's ok for spells that do damage by default... you simply modify the damage (over an area or a certain unit)... and if the unit that spell is casted on dies, the hero gets the reward. But what's happening when the spell don't make damage by default ?
Let's take this as an example. I have a hero that when a spell is casted... then the hero teleports over the target, do a certain amount of damage for every level (again, that level checking problem)... then do some more effects (stun attacked unit, etc).
Isn't there any better way than creating a dummy that's doing a certain ammount of damage to the attacked unit ?

Thank you in advance for your help. I apreciate it !
01-08-2004, 05:01 AM#2
zotax
Number 1 requires custom text, theres a tutorial on it in the tutorials section I believe.
I dont quite get number 2, do you want to find out if there an easier way to inflict damage on a unit from a spell, than using a dummy unit because triggers dont give xp/bounty?
01-08-2004, 09:39 AM#3
MonkY
Quote:
Originally posted by zotax
Number 1 requires custom text, theres a tutorial on it in the tutorials section I believe.
I dont quite get number 2, do you want to find out if there an easier way to inflict damage on a unit from a spell, than using a dummy unit because triggers dont give xp/bounty?

That's right. Well, i'll look more for tutorials... as for number 2, yes. Is there a way to call a custom script for example, so that the damage dealed gives reward (for example i'll use set attacked unit life = attacked unit life - random 100-500... and the attacked unit dies, then give reward to that hero)
01-08-2004, 10:16 AM#4
Hivemind
#1: Make a intiger variable for each skill (or use a array and keep track of which skill uses which part of the array) and use the event (Hero - learns skill) to keep track of the level. Dont remember the exact event name but you should be able to find it. This can be done in GUI without Jass.

#2: Just add a line to the end of your damage trigger - If target unit life less than 1 then do (whatever reward you want).
01-08-2004, 09:52 PM#5
AnarkiNet
the best way to get xp/bounties with a dummy spell/unit is to make a custom upgrade and then increment the level of the upgrade every time the unit learns a spell. the upgrade should be "ability level bonus" with a base value of 0 and an increment value of 1. only problem with this is if your map has tome of retraining, you cant lower the level of the upgrade :(
01-08-2004, 09:56 PM#6
Eriond
Or you can use the integer condition, level of ability for unit....
01-10-2004, 02:28 PM#7
LegolasArcher
Right on, Eroind! That was a great addition in the new patch...
01-10-2004, 02:31 PM#8
35263526
I love Blizzard for that. I had to use huge arrays and JASS (which isn't my strongpoint) to get that previously.