Here is what I'm doing to make a crit. I make a regular damage effect, with 100% chance and 15 damage. I then make a bonus damage effect, with 15% chance and 10 damage. Make a set and include both of them, and then link the set to the weapon. So theoretically what should happen is that 85% of the time one damage effect should go off and 15% of the time both will go off.
The issue is, I have created a scrolling battle text that looks like this:
When the crit lands, it only shows the damage being done from the bonus damage and not the normal damage. It could be that both damage effects are being fired, but the trigger just can't read the regular damage for some reason? This shouldn't be the case because the trigger is looking at the enemy's life and not the triggering damage amount. Are there any apparent flaws in my logic?
Edit: It does appear that both damage effects are landing at the same time when the crit occurs, which is great, but why is it that the battle text is showing only the bonus damage and not both effects combined?
I dunno, but if you want ill share with you how i did mine.
Basically I made a behaviour that when applied doubles the damage of the unit buffed. Then for a trigger that applies it, i have it ran
General - If (Conditions) then do (Actions) else do (Actions)
If
(Random real between 0.0 and 100.0) <= 25.0
Then
Unit - Add 1 Critical Strike - Standard to (Triggering unit) from (Triggering unit)
The buff lasts for .5 seconds, and handles the damage step up. Then my scrolling combat text has a CRITICAL STRIKE text before the damage if the damaging target has the critical behaviour.
Maybe the text tags overlap? Tey are both created in same position. Maybe you could use Unit takes damage as event and detect which of the events did the damage, and if it is the critical one, use some other height offset.
Thanks guys. Coron, I am curious what your trigger event is.. probably any unit takes damage right? If only there were a 'unit fires weapon' trigger to make all of our lives easier. Mort, I am not sure that is the case because the second number for my crit is a zero, so the other number would probably show up in there. I could see this happening if they were the same number however. There was a post a while back by Rileystarcraft where he was talking about the function 'get triggering damage' and how it would not read any modified damage, just the flat base damage. Perhaps this issue is in the same vein.
And actually, there is a new event in 1.1 called effect used that could function as 'unit fires weapon' :D time for an ammo system!
If your still wondering what my trigger setup is, here ya go. If not, maybe itll help someone else trying to do similar.
I have a trigger that as shown above that does the random roll. This is off of an event UNIT STARTS ATTACKING
My damage and notification trigger is off of UNIT DEALS DAMAGE.
This gives me 2 triggers that happen, in order, with the unit attack. I made both triggers have a condition that TRIGGERING UNIT has HEROIC attribute TRUE. This makes it so only your heroes damage will show.
Guys, this is much simpler than you're making it out to be.
1. Make a new behavior, "Critical Strike"
2. Under Damage Response.Chance set it to the crit odds you want. For example, 0.25 will make you crit 25% of the time.
3. Under Damage Response.Location set it to Attacker.
4. Under Damage Response.Modify Fraction, set it to the critical bonus you want. For example, 2 will make crits do double damage.
That's it. Give the behavior to whatever unit you want.
Here is what I'm doing to make a crit. I make a regular damage effect, with 100% chance and 15 damage. I then make a bonus damage effect, with 15% chance and 10 damage. Make a set and include both of them, and then link the set to the weapon. So theoretically what should happen is that 85% of the time one damage effect should go off and 15% of the time both will go off.
The issue is, I have created a scrolling battle text that looks like this:
When the crit lands, it only shows the damage being done from the bonus damage and not the normal damage. It could be that both damage effects are being fired, but the trigger just can't read the regular damage for some reason? This shouldn't be the case because the trigger is looking at the enemy's life and not the triggering damage amount. Are there any apparent flaws in my logic?
Edit: It does appear that both damage effects are landing at the same time when the crit occurs, which is great, but why is it that the battle text is showing only the bonus damage and not both effects combined?
@voodude2008:
I dunno, but if you want ill share with you how i did mine.
Basically I made a behaviour that when applied doubles the damage of the unit buffed. Then for a trigger that applies it, i have it ran
General - If (Conditions) then do (Actions) else do (Actions)
If
(Random real between 0.0 and 100.0) <= 25.0
Then
Unit - Add 1 Critical Strike - Standard to (Triggering unit) from (Triggering unit)
The buff lasts for .5 seconds, and handles the damage step up. Then my scrolling combat text has a CRITICAL STRIKE text before the damage if the damaging target has the critical behaviour.
Hope this helps
Heres a screen of what it looks like
Maybe the text tags overlap? Tey are both created in same position. Maybe you could use Unit takes damage as event and detect which of the events did the damage, and if it is the critical one, use some other height offset.
@coronbale: Go
Thanks guys. Coron, I am curious what your trigger event is.. probably any unit takes damage right? If only there were a 'unit fires weapon' trigger to make all of our lives easier. Mort, I am not sure that is the case because the second number for my crit is a zero, so the other number would probably show up in there. I could see this happening if they were the same number however. There was a post a while back by Rileystarcraft where he was talking about the function 'get triggering damage' and how it would not read any modified damage, just the flat base damage. Perhaps this issue is in the same vein.
And actually, there is a new event in 1.1 called effect used that could function as 'unit fires weapon' :D time for an ammo system!
@voodude2008:
If your still wondering what my trigger setup is, here ya go. If not, maybe itll help someone else trying to do similar.
I have a trigger that as shown above that does the random roll. This is off of an event UNIT STARTS ATTACKING
My damage and notification trigger is off of UNIT DEALS DAMAGE.
This gives me 2 triggers that happen, in order, with the unit attack. I made both triggers have a condition that TRIGGERING UNIT has HEROIC attribute TRUE. This makes it so only your heroes damage will show.
Guys, this is much simpler than you're making it out to be.
1. Make a new behavior, "Critical Strike"
2. Under Damage Response.Chance set it to the crit odds you want. For example, 0.25 will make you crit 25% of the time.
3. Under Damage Response.Location set it to Attacker.
4. Under Damage Response.Modify Fraction, set it to the critical bonus you want. For example, 2 will make crits do double damage.
That's it. Give the behavior to whatever unit you want.
@RileyStarcraft: Go
It should be noted that this is an incomplete description of the solution.
View this thread for further details about making this work: http://forums.sc2mapster.com/development/map-development/2562-critical-strike-issue-and-item-activation-issue/#p6