HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger based Critical Strike - Need help

01-23-2006, 07:11 PM#1
Kul'thran
Okay, I've been making a Warrior Hero that has an innate ability to swap stances. She has defensive stance(more armor, less damage) and Fury Stance(less armor, more damage and... chance to crit).

The problem is, I can't make a dummy chance to crit ability and stick it on her because when I do, removing all the icons, I always get a Green Icon square in the lower left corner of the command button section and it messes up my hero skills: Zoom (requires log in)

I can't find a way around it, it seems like you must base a dummy skill that originally had no icon for it to work it seems.

After trying everything I could with spells and abilities, I decided to try a trigger-made critical strike whenever the Warrior was in Fury Stance.

Trigger:
FuryStance Crit
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
(Unit-type of (Attacking unit)) Equal to Therista (Fury Stance)
((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
Collapse Actions
Trigger - Add to (This trigger) the event (Unit - (Attacked unit) Takes damage)
Set Critchance = (Random integer number between 1 and 10)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Critchance Equal to 5
Collapse Then - Actions
Set TheristaDamage = (2.00 x (Damage taken))
Unit - Cause (Attacking unit) to damage (Attacked unit), dealing TheristaDamage damage of attack type Hero and damage type Normal
Floating Text - Create floating text that reads ((String(TheristaDamage, 0, 2)) + !) above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
Wait 2.00 seconds
Floating Text - Destroy (Last created floating text)
Collapse Else - Actions
Do nothing

The chance to crit seems to work fine, but whenever I try to produce the floating text about the crit damage, it comes out as 0.00! :/

Also, I don't have a way of telling if she really hit for double damage or not. (and I'm having trouble making it look like the crit text, it stays on too long and doesn't fade enough and I'm sure of the speed...) So... what do I do? anyone have any suggestions?
Attached Images
File type: jpgMessedUpCrit.jpg (32.7 KB)
01-23-2006, 07:20 PM#2
Anitarf
There's a trick that you can use to avoid triggering completely.

There's an item ability named Spellbook that can hold other abilities inside of it. When you click on the spellbok icon, those abilities are shown. The trick is, if you put a passive ability into the spellbook, and then disable the spellbook for the player with a trigger, the spellbook won't show an icon (because it's disabled), but the passive ability inside it will still affect your unit. You can make an icon-less version of any passive ability this way.
01-23-2006, 07:23 PM#3
SmileyJeff
Instead of using wait, disable the permanece 1st, then continue with lifespan and fading. Remove the "destroy last created floating text" also.

Floating text:
Trigger:
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
01-23-2006, 07:23 PM#4
Kul'thran
Really? I gotta give that a try! Thank you!

To Jeff: Thanks for that too. :)

Edit: I have a question, via Spellbook, can you combine attribute bonus abilities with other things, like improved mana regeneration? (All passives) to make a single hero passive ability that does more than gives you +2 strength per level, but also adds +1 armor at each level?

Edit 2: W00t! The Spellbook thing worked! that was great!