HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Critical strike aura

04-10-2009, 07:25 PM#1
Magissia
Hi, i tryed to make an critical strike aura, this critical strike aura should give a chance to make a critical strikr with every damage thing (spells, normal attacks, damage over time attacks)

I tryed this, but it crash Warcraft when i attack something ...

Hidden information:
Trigger:
Init crit aura
Collapse Events
Map initialization
Conditions
Collapse Actions
Collapse Groupe unité - Pick every unit in (Units in (Playable map area)) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Custom value of (Picked unit)) Egal Ã* 0
Collapse Then - Actions
Trigger - Add to Critaura <gen> the event (Unit - (Picked unit) take damage)
Unit - Set the custom value of (Picked unit) to 1
Else - Actions

Trigger:
Enter
Collapse Events
Unit - A unit enters (Playable map area)
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Custom value of (Triggering unit)) Egal Ã* 0
Collapse Then - Actions
Trigger - Add to Critaura <gen> the event (Unit - (Triggering unit) Take damage)
Unit - Set the custom value of (Triggering unit) to 1
Else - Actions

Trigger:
Critaura
Events
Conditions
Collapse Actions
Custom script: local texttag udg_Temp_Text1 = null
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Damage source) has buff Critaura ) Egal Ã* TRUE
Collapse Alors - Actions
Set Crit_Proc = (Random integer number between 1 and 100)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Crit_Proc lower or equal to* (2 x (Integer((Real((Level of Critaura for Magissia_Unit))))))
Collapse Then - Actions
Collapse Set Temp_pos3 = (Position of (Damage source))
Unit - Cause (Damage source) to damage (Triggering unit), dealing ((Damage taken) / 2.00) damage of attack type Sorts and damage type Magique
Floating text - Create floating text that reads ((String((Integer(((Damage taken) x 1.50))))) + !) above (Damage source) with Z offset 0.00, using font size 10.00, color (100.00%, 10.00%, 10.00%), and 0.00% transparency
Set Temp_Text1 = (Last created floating text)
Floating text - Change Temp_Text1: Désactiver permanence
Floating text - Set the velocity of Temp_Text1 to 100.00 towards 90.00 degrees
Floating text - Change the lifespan of Temp_Text1 to 1.00 seconds
Floating text - Change the fading age of Temp_Text1 to 0.50 seconds
Wait 1.30 seconds
Floating text - Destroy Temp_Text1
Custom script: call RemoveLocation( udg_Temp_pos3 )
Else - Actions
Else - Actions


Someone have an idea? =/
04-10-2009, 07:35 PM#2
Fireeye
Disable the Critaura trigger before dealing damage and re enable it afterwards.
Reason: The trigger fires when ANY damage appears, therefore the crit fires itself again.
04-10-2009, 08:00 PM#3
Kyrbi0
This'd be much easier with a different trigger..

Have a custom Aura ability (based off an existing one, but with different buff/icon/tooltip/etc) that gives no bonus. Then make a custom Critical Strike ability, with no icon (find one that does, if you can).

Then make a trigger that says:
E - Unit is attacked
C - (nothing here)
A - (big IF/THEN/ELSE)
IF - Attacking unit has buff (Buff of your Custom Aura)
THEN - Add (Custom Crit. Strike Ability) ability to Attacking Unit
ELSE - Remove (Custom Crit. Strike Ability) ability from Attacking Unit.

Otherwise, you could also use a periodic trigger, but this doesn't leak. It also won't update automatically; only on attack.
04-10-2009, 08:10 PM#4
Magissia
But critical strike ability can't crit with flamestrike or blizzard

Quote:
Disable the Critaura trigger before dealing damage and re enable it afterwards.

Can you rewrite this in a different way ? i don't understand (my english sucks i know :-( )
i understood that game crash because it crit on crit on crit on crit ... [infinit] but not the first line

Sorry again my english sucks =o
04-10-2009, 08:16 PM#5
Kyrbi0
Quote:
Originally Posted by Magissia
But critical strike ability can't crit with flamestrike or blizzard
??? Are you referring to me? I don't see how this applies. The trigger I posted above makes a working "Critical Strike Aura", if that's your question.
04-10-2009, 08:23 PM#6
Fireeye
Quote:
But critical strike ability can't crit with flamestrike or blizzard

Quote:
Disable the Critaura trigger before dealing damage and re enable it afterwards.

Can you rewrite this in a different way ? i don't understand (my english sucks i know :-( )
i understood that game crash because it crit on crit on crit on crit ... [infinit] but not the first line

Sorry again my english sucks =o

Use this
Trigger:
Trigger - Turn off (This trigger)
before you deal the crit strike damage and
Trigger:
Trigger - Turn on (This trigger)
to enable the trigger afterwards.
04-10-2009, 08:24 PM#7
Magissia
i tryed to make an critical strike aura that can make a critical strike for every damage things (damage over time, area spells, normal attacks) ^^

but thanks tryed to help me =o

Quote:
Originally Posted by Fireeye
Use this
Trigger:
Trigger - Turn off (This trigger)
before you deal the crit strike damage and
Trigger:
Trigger - Turn on (This trigger)
to enable the trigger afterwards.

Ok, i'll try !

Edit : thanjs you it's don't crash anymore =D

i have now a problem with my floating text, if a spell crit it show normaly, but if a normal attack crit it show a 000 line and the crit's damage one the same line

Bug screen if someone want it

04-10-2009, 08:27 PM#8
Kyrbi0
Quote:
Originally Posted by Magissia
i tryed to make an critical strike aura that can make a critical strike for every damage things (damage over time, area spells, normal attacks) ^^
Ah, well that makes things very different. Might've wanted to know that in the first post. :P
04-10-2009, 08:29 PM#9
Anitarf
Umm... It is in the first post.
04-10-2009, 10:57 PM#10
Rising_Dusk
You're likely going to want to use a Damage Detection System and then detect if a unit has the aura's buff in the condition and deal the bonus damage on top of the base damage. There are numerous options for that, check the code resources in the database to see them all.
04-10-2009, 11:49 PM#11
Magissia
I tryed to use one but i suck in jass >_>
04-11-2009, 03:03 AM#12
Kyrbi0
Quote:
Originally Posted by Anitarf
Umm... It is in the first post.
Good point; my bad.
04-11-2009, 06:24 AM#13
ShadowWolf
Quote:
Originally Posted by Magissia
I tryed to use one but i suck in jass >_>
You can still use it. Have someone help you set up a trigger in JASS that works with the damage detection system, stores the data (units, vars) that you need in global vars and order it to run a seperate trigger, from which you can build in GUI and work however you want.
04-11-2009, 04:24 PM#14
Magissia
Euuuw, how to do it ?

If someone want help me sure i won't say no, but don't want take too much timeto someone =X