Breath of fire trigger spell

sheep

New Member
Reaction score
2
I made a Breath of fire spell, the damage output is based of str and int.
Therefor i made a dummy breath of fire spell which dosent do damage, and then i made a trigger to detect which units where effected, the problem is, that it dosent work :p

Variabels:
Cast_str: interger
Cast_int: interger
Breath_of_fire: interger

Buffs:
BOF: breath of fire buff, just changed the tooltip

Trigger:
  • Breath of fire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Breath of Fire
    • Actions
      • Set Cast_str = (Strength of (Casting unit) (Include bonuses))
      • Set Cast_int = (Intelligence of (Casting unit) (Include bonuses))
      • Set Breath_of_fire = (((((Real(Caste_int)) + (Real(Caste_str))) / 5.00) x (((Real(Caste_int)) + (Real(Caste_str))) / 5.00)) x 1.00)
      • Game - Display to (All players) the text: (String(Breath_of_fire))
      • Wait 1.00 seconds
      • Game - Display to (All players) the text: 1 sek
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) has buff BOF ) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Casting unit) to damage (Picked unit), dealing Breath_of_fire damage of attack type Spells and damage type Fire
          • Game - Display to (All players) the text: (String((Number of units in (Units in (Playable map area) matching (((Triggering unit) has buff BOF ) Equal to True)))))


The part not working is the "loop" or the "unit group - pick".
the other stiff works.

P.S. how do I make it fancy, with the real event icon and stuff like that ?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Code:
Unit Group - Pick every unit in (Units in (Playable map area) matching ((([COLOR="Red"]Picked unit[/COLOR]) has buff BOF ) Equal to True)) and do (Actions)
Picked unit should be (Matching Unit) instead

Also use Triggering Units instead of Casting Unit, it's just better

EDIT: Also your unit group leaks, u need to set it into a Unit Group variable, and then use:
call DestroyGroup(udg_Your_Variable)

Write this in custom script
 

sheep

New Member
Reaction score
2
Custom script: call DestroyGroup

Hi, I made a Trigger based Breath of fire, works like at charm, well almost becuse in the end I destroy the unitgroup so it wont leak.
Becuse i destroy it, it can only work ones.
Is there another whay that I can clear the group without destroying it.?

Trigger:
  • Breath of fire
    • Actions
      • Unit Group - Add all units of (Units in (Playable map area) matching (((Matching unit) has buff BOF ) Equal to True)) to Temp_unitgroup
      • Unit Group - Pick every unit in Temp_unitgroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing Breath_of_fire damage of attack type Spells and damage type Fire
      • Custom script: call DestroyGroup(udg_Temp_unitgroup)
:thup:
 

Samael88

Evil always finds a way
Reaction score
181
JASS:
call GroupClear(<your group>)

I have a thing to add to this:

call GroupClear(udg_YourGroup)

Shall it not be that? beacuse it is a User Defined Global. If you are using the variable editor to make a variable it is nessecary to have the udg_ tag infront of the name:thup:
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Replace the first line with:
Set Group = Units in (Playable map) matching (((Matching unit) has buff <buff>) equal to true)

The "add" action, as used, leaks the group it is adding...


If you need to keep the group:
Set Group = ... same as above ...
Unit group - Add all units of Group to GroupToKeep
Custom script: call DestroyGroup( udg_Group )
 

sheep

New Member
Reaction score
2
So this trigger will not leak?

Trigger:
  • Breath of fire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Breath of Fire
    • Actions
      • Set Cast_str = (Strength of (Casting unit) (Include bonuses))
      • Set Cast_int = (Intelligence of (Casting unit) (Include bonuses))
      • Set Breath_of_fire = (((((Real(Cast_int)) + (Real(Cast_str))) / 5.00) x (((Real(Cast_int)) + (Real(Cast_str))) / 5.00)) x 1.00)
      • Game - Display to (All players) the text: (String(Breath_of_fire))
      • Set Temp_unitgroup = (Units in (Playable map area) matching (((Triggering unit) has buff BOF ) Equal to True))
      • Unit Group - Pick every unit in Temp_unitgroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing Breath_of_fire damage of attack type Spells and damage type Fire


thx for the help :D
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
You need to destroy the group at the end...
Custom script: call DestroyGroup( udg_Temp_unitgroup )


Additionally, it's not working correctly:
> matching (((Triggering unit)

matching (((Matching unit)
 

sheep

New Member
Reaction score
2
Now I cant make it work at all, I need a new pair of eyes on this, where did I fail?

Trigger:
  • Breath of fire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Breath of Fire
    • Actions
      • Set Cast_str = (Strength of (Casting unit) (Include bonuses))
      • Set Cast_int = (Intelligence of (Casting unit) (Include bonuses))
      • Set Breath_of_fire = (((((Real(Cast_int)) + (Real(Cast_str))) / 5.00) x (((Real(Cast_int)) + (Real(Cast_str))) / 5.00)) x 1.00)
      • Game - Display to (All players) the text: (String(Breath_of_fire))
      • Game - Display to (All players) the text: (Name of (Casting unit))
      • Set Temp_unitgroup = (Units in (Playable map area) matching (((Matching unit) has buff BOF ) Equal to True))
      • Game - Display to (All players) the text: (String((Number of units in Temp_unitgroup)))
      • Unit Group - Pick every unit in Temp_unitgroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Matching unit), dealing Breath_of_fire damage of attack type Spells and damage type Fire
          • Game - Display to (All players) the text: (Name of (Matching unit))
      • Custom script: call DestroyGroup( udg_Temp_unitgroup )


It dosent put units into my unitgroup. And i dont know why.!!!
 

sheep

New Member
Reaction score
2
Can still make that fucking trigger work, and it whould, I just cant see whats wrong. plz help

Trigger:
  • Breath of fire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Breath of Fire
    • Actions
      • Set Cast_str = (Strength of (Casting unit) (Include bonuses))
      • Set Cast_int = (Intelligence of (Casting unit) (Include bonuses))
      • Set Breath_of_fire = (((((Real(Cast_int)) + (Real(Cast_str))) / 5.00) x (((Real(Cast_int)) + (Real(Cast_str))) / 5.00)) x 1.00)
      • Game - Display to (All players) the text: (String(Breath_of_fire))
      • Game - Display to (All players) the text: (Name of (Casting unit))
      • Set Temp_unitgroup = (Units in (Playable map area) matching (((Matching unit) has buff BOF ) Equal to True))
      • Game - Display to (All players) the text: (String((Number of units in Temp_unitgroup)))
      • Unit Group - Pick every unit in Temp_unitgroup and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing Breath_of_fire damage of attack type Spells and damage type Fire
          • Game - Display to (All players) the text: (Name of (Matching unit))
      • Custom script: call DestroyGroup( udg_Temp_unitgroup )


the "Game - Display to (All players) the text: (String((Number of units in Temp_unitgroup)))" give me 0, therefore i know that no units is added to my unit group, but i dont know why!!
 

Nexor

...
Reaction score
74
perhaps the targets will get the buff a bit later after the cast, so there will be no unit with the buff
 

Shadow14l

New Member
Reaction score
11
Can still make that fucking trigger work, and it whould, I just cant see whats wrong. plz help

Trigger:
  • Breath of fire
    • Actions
      • Game - Display to (All players) the text: (Name of (Matching unit))

You need to put that as (Name of (Picked unit))
 

Zetrix91

TH.net Regular
Reaction score
2
Okay,im kinda noob to trigging, but i got a god idea of a trigger. can someone just please tell how i do the action thingy "Set_Tempunitgroup" Thingy.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top