HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Simple spell won't work!

08-24-2006, 12:55 AM#1
martix
Well, this is not my spell, its some other guy's problem, but its a damn stubborn thing that just won't work - I checked and rechecked and double-re-rechecked everything, and it doesn't work!
Quote:
Originally Posted by AgentPaper
Trying to make an ability, that moves the caster to the target, and then damages the target for damage based on his stats, as well as half of that damage in a small range. Here's what I have:
Trigger:
ID Cast
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Ignited Dash
Collapse Actions
Set ID_Damage = ((1.50 + ((Real((Level of Ignited Dash for (Casting unit)))) / 2.00)) x ((Real((Strength of (Casting unit) (Include bonuses)))) + (Real((Agility of (Casting unit) (Include bonuses))))))
Game - Display to (All players) the text: (ID_Damage = + (String(ID_Damage)))
Game - Display to (All players) the text: (Target = + (Name of (Target unit of ability being cast)))
Game - Display to (All players) the text: (Caster = + (Name of (Casting unit)))
Unit - Move (Casting unit) instantly to (Position of (Target unit of ability being cast)), facing (Position of (Target unit of ability being cast))
Game - Display to (All players) the text: Moved
Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing (ID_Damage / 2.00) damage of attack type Spells and damage type Normal
Game - Display to (All players) the text: Target Damage
Collapse Unit Group - Pick every unit in (Units within 200.00 of (Position of (Target unit of ability being cast)) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)) and do (Actions)
Collapse Loop - Actions
Game - Display to (All players) the text: (Picked Unit = + (Name of (Picked unit)))
Unit - Cause (Casting unit) to damage (Picked unit), dealing (ID_Damage / 2.00) damage of attack type Spells and damage type Normal
Game - Display to (All players) the text: Area Damage
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
Game - Display to (All players) the text: Effect Start
Wait 1.00 seconds
Special Effect - Destroy (Last created special effect)
Game - Display to (All players) the text: Effect destroyed
What it does: Sets the damage variable right, moves the unit correctly (though I plan to make it more fancy), and then does no damage to the target or targets around it, and doesn't show the effect. I've gone over this at least two dozen times, and I can't get it to work. Anyone see something I missed? There something special about "Damage Target" I don't know?
08-24-2006, 05:34 AM#2
Ignitedstar
Huh? His trigger looks fine. I looked through it about four times.

I made this, which is a little different from the one your friend made. I tested it and it does work. Maybe he missed something?

NOTE: I based the ability off Blink, little did I know that Blink is probably hard-coded to ensure that it can never target an actual unit(setting the "Targets Allowed" field didn't work, no matter how many combinations I tried).

Trigger:
Blink Strike and AOE Damage
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Blink Strike
Collapse Actions
Set SpellDamage = ((1.50 + ((Real((Level of Blink Strike for (Casting unit)))) / 2.00)) x ((Real((Strength of (Casting unit) (Include bonuses)))) + (Real((Agility of (Casting unit) (Include bonuses))))))
Set Temp_Group = (Units within 200.00 of (Position of (Target unit of ability being cast)) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True))
Unit - Move (Casting unit) instantly to (Position of (Target unit of ability being cast)), facing (Facing of (Target unit of ability being cast)) degrees
Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing SpellDamage damage of attack type Spells and damage type Normal
Collapse Unit Group - Pick every unit in Temp_Group and do (Actions)
Collapse Loop - Actions
Unit - Cause (Casting unit) to damage (Picked unit), dealing (SpellDamage / 2.00) damage of attack type Spells and damage type Normal
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
Wait 1.00 seconds
Special Effect - Destroy (Last created special effect)
Custom script: call DestroyGroup(udg_Temp_Group)