HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spell question

02-23-2004, 07:51 PM#1
Kamahl
How do I make it so that when a certain skill that triggers a unit is used, and a valid target is chosen, I do damage to the target based on the skill user's attack? For example, I want a healer unit that can heal friendly units by using a skill on them. But it's not just a straight-up healing spell, he attacks them and it does -50 or so % of his attack to them (thus healing them for half his attack damage). But, it is based off a spell that has an effect (such as Inner Fire or Bloodlust), so I don't want it to lose the effect. And it needs to be based off of the units damage. Can anyone help me with this? Thanks.
02-23-2004, 07:56 PM#2
Shimrra
To make a trigger spell, start by making a dummy ability. A dummy ability is an ability that has the description of the spell and effects the desired targets. It usually costs mana and has a cooldown. Set the targets allowed field to equal what you want the spell to be capable of targeting. To initiate the trigger, do the following:
Code:
[b]Event:[/b] A unit begins casting an ability
[b]Condition:[/b] ability being cast is equal to <Your Dummy Ability>
[b]Actions:[/b] Place the desired actions here

What you need to do is base the ability off, let's say, Bloodlust. Make a custom Bloodlust that does all the normal bloodlust effects and say:
Code:
[b]Event:[/b] A unit begins casting an ability
[b]Condition:[/b] ability being cast is equal to <New Bloodlust>
[b]Actions:[/b] Place the desired actions here

Unfortunately, I do not know of a way to say half the units damage... What I would suggest is that you look in game and see what the units damage is and then do this action:
Code:
[b]Actions:[/b] Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + <Heal Value>)

Sorry if this wasn't what you were looking for.
02-23-2004, 08:07 PM#3
Kamahl
This helps alot. I knew I'd need the dummy, but I've never done a trigger spell like this before, and I don't know how to get a unit's damage in a trigger. The only thing I need now is how to actually call the damage (I could do it your way, but he's a hero, so it's more complicated). Thanks for all the help!
02-23-2004, 08:09 PM#4
Shimrra
Your welcome. As for calling the damage, I don't believe there is a way to do it via triggers, at least not in GUI and I do not understand Jass...
02-23-2004, 08:16 PM#5
Kamahl
Alright, I'll probably use average damages then. You just stopped me from spending a few hours trying to find a working trigger.
02-23-2004, 09:13 PM#6
ThyFlame
afaik, JASS is triggers in text format.
02-24-2004, 01:26 AM#7
Kamahl
Quote:
afaik

Huh?

Quote:
JASS is triggers in text format

I know that. But it's trickier since you have to script it all yourself, but more powerful.
02-24-2004, 01:32 AM#8
Shimrra
Jass is very different... I'm very good with GUI, but couldn't make a wait in Jass if my life depended on it.