HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Triggered-Ability Help, Please!

06-27-2004, 03:09 PM#1
Vandell
I have a problem, that is more-than-likely easilly fixed. Using triggers, I'm trying to make it so that when <SPELLNAME> is cast on a target unit, it deals <BASEDAMAGE> to the target (and this is the part I need help with) plus (level of casting hero x 15). I've got the base damage done fine, but I can't get the level-based additional damage down correctly.
06-27-2004, 03:29 PM#2
johnfn
What you want is... wait, you already said it!

set HP of (attackedunitsHP) = attackedunitsHP - (hero level of (casting unit) x 15)

Unless you are asking for something else I think thats what you want.
06-27-2004, 03:46 PM#3
Vandell
Quote:
Originally Posted by johnfn
What you want is... wait, you already said it!

set HP of (attackedunitsHP) = attackedunitsHP - (hero level of (casting unit) x 15)

Unless you are asking for something else I think thats what you want.

You see, the thing is.. this is what I currently have it as.. (name of the skill is Collapse)

EVENTS:
o Unit - A unit finishes casting an ability.

CONDITIONS:
o (Ability being cast) Equal to Collapse

ACTIONS:
o Unit - Set life of (Targeted unit) to ((Life of (Targeted unit) - (15.00 x 1.00))

The problem is that I can't change that last "1.00" to casting hero's level because the option doesn't show up on the drop-down list. :\
06-27-2004, 03:56 PM#4
Vandell
Mleh, just to add on, I've tried setting an interger array (initial value: 1) that gets +1 to it every time a hero owned by the player gains a level, but I can't seem to put that in the "1.00" spot either.
06-27-2004, 04:01 PM#5
johnfn
Oh, duuh. Look in the dropdown list for integer to real conversion and then click hero level.
06-27-2004, 04:11 PM#6
Vandell
Oh, phudge.. I completely forgot. x.x;

Mleh.. I -really- appreciate all this information you're giving me, by the way- so far, the ability works as it was made (thanks!), but..!

What about adding in levels to the trigger? Such as.. if it were level 1, it would deal herolevel x 15 damage, or level 2 would be herolevel x 17.5 damage, or level 3 would be herolevel x 20 damage?
06-27-2004, 04:24 PM#7
johnfn
Quote:
Originally Posted by Vandell
Oh, phudge.. I completely forgot. x.x;

Mleh.. I -really- appreciate all this information you're giving me, by the way- so far, the ability works as it was made (thanks!), but..!

What about adding in levels to the trigger? Such as.. if it were level 1, it would deal herolevel x 15 damage, or level 2 would be herolevel x 17.5 damage, or level 3 would be herolevel x 20 damage?
Err. How about this (looks a bit confusing but should work)

damage = (level of (hero)) x (12.5 + (herolevel x 2.5))
06-27-2004, 04:26 PM#8
Vandell
Quote:
Originally Posted by johnfn
Err. How about this (looks a bit confusing but should work)

damage = (level of (hero)) x (12.5 + (herolevel x 2.5))

Oh, no, sorry, sorry.. I meant level of the -ability-. x_x Sorry, stupid me. You know, doing "If / Then / Else" actions, where "If" is the level of the ability, "Then" is the action, and if "If" isn't true then move on to "Else", where "Else" is the 2nd level of the ability, and so on, to the 3rd level.
06-27-2004, 04:36 PM#9
johnfn
I decided to make the entire trigger because, well, I'm that bored.

Skill
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to (Your skill)
Actions
Set SkillLevel = (SkillLevel + 1)

That will set the skillLevel of the skill. All you need to do now is in the main trigger,

damage = (level of (hero)) x (12.5 + (SkillLevel x 2.5))
06-27-2004, 04:49 PM#10
Vandell
Quote:
Originally Posted by johnfn
I decided to make the entire trigger because, well, I'm that bored.

Skill
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to (Your skill)
Actions
Set SkillLevel = (SkillLevel + 1)

That will set the skillLevel of the skill. All you need to do now is in the main trigger,

damage = (level of (hero)) x (12.5 + (SkillLevel x 2.5))

Um.. what kind of Variable should SkillLevel be? Interger, or.. what? @_x; 'cause, I just tried it as an Interger variable, and it doesn't work. I can't select it because it says "No variables of this type defined" under Arithmetic. Do I have to use the Real to Interger conversion again?
06-27-2004, 05:06 PM#11
Vandell
Wewt! Nevermind, I just got it. <3 Thank you!
06-28-2004, 01:30 AM#12
Rafael Br
Ok, this all looks fine and works, but, you may know that this will not give you bounty/experience, another point is what happends when more than one unit has this abillity, well the variable will get higher every time somebody learns it...
Use the integer comparison level of abillity for unit, and for bounty/experience, use dummy units and order then to attack the targeted unit.