[Solved] Help With Bloodlust Spell

Status
Not open for further replies.
Level 9
Joined
Apr 22, 2020
Messages
430
Hello guys i have a very small problem with the bloodlust spell and in need of your help how can add an effect on bloodlust? Unexpectedly when i add an effect in the Art - Effect tab on bloodlust it won't show up even if i added the attachment points of it. I wanted bloodlust to have extra effect on the unit who has it i have downloaded a effect spell called power Infusion which is like a buff effect that is supposed to show up on the units head and i wanted to add it on the unit but it just complicates the attachment point of the bloodlust which is the hand-right and hand-left and i wanted the power Infusion i just downloaded to show up in the units head so how can i solve this minor problem?
 
Level 9
Joined
Apr 22, 2020
Messages
430
The Art is added through the Buff. Pretty sure you can add multiple effects to it.

If not, you'll have to trigger it.
Well how can i have this Power Infusion
To be used as an buff effect on top on the units head while there is still the original bloodlust effect? And if i put this buff effect on Art - Target it will just be on the units right and left hand because of the bloodlust effect of course but i want this to be on top of the units head so how can i solve this?

Edit:Oh My God my mistake i just realize this now its not a bloodlust its a frenzy. Bloodlust can be casted on friendly units while frenzy in like a self bloodlust sorry my mistake i meant frenzy.
 
Last edited:

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,272
You could store the casting unit and the special effect as variables and turn on a trigger that uses a Periodic Interval to repeatedly check if the unit has the buff. If it no longer has the buff then you can destroy the special effect.

Cast Trigger:

Events:
A unit starts the effect of an ability

Conditions:
Ability being cast equal to Frenzy

Actions:
Set FrenzyUnit = Triggering unit
Create special effect overhead of triggering unit using Power Fusion model
Set FrenzySfx = Last created special effect
Turn on Timer trigger


Timer Trigger (Set this trigger to Initially OFF):

Events:
Every 0.25 seconds

Conditions:
FrenzyUnit has buff Frenzy equal to False

Actions:
Destroy FrenzySfx
Turn off this trigger
 
Level 9
Joined
Apr 22, 2020
Messages
430
You could store the casting unit and the special effect as variables and turn on a trigger that uses a Periodic Interval to repeatedly check if the unit has the buff. If it no longer has the buff then you can destroy the special effect.

Cast Trigger:

Events:
A unit starts the effect of an ability

Conditions:
Ability being cast equal to Frenzy

Actions:
Set FrenzyUnit = Triggering unit
Create special effect overhead of triggering unit using Power Fusion model
Set FrenzySfx = Last created special effect
Turn on Timer trigger


Timer Trigger (Set this trigger to Initially OFF):

Events:
Every 0.25 seconds

Conditions:
FrenzyUnit has buff Frenzy equal to False

Actions:
Destroy FrenzySfx
Turn off this trigger
Ok in the action part till the end im a bit confused what action type tabs should i press to make those things come out? Really sorry im a bit new to triggers.
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,272
Added an extra If Then Else to it, this way if you cast it again before the previous cast has finished it won't create an extra Special Effect.
  • Frenzy Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frenzy
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (FrenzyUnit has buff Frenzy) Equal to True
        • Then - Actions
          • Special Effect - Destroy FrenzySfx
        • Else - Actions
      • Set VariableSet FrenzyUnit = (Triggering unit)
      • Special Effect - Create a special effect attached to the overhead of FrenzyUnit using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
      • Set VariableSet FrenzySfx = (Last created special effect)
      • Trigger - Turn on Frenzy Timer <gen>
This Frenzy Timer trigger should have "Initially On" unchecked. It's one of the 2 checkboxes above the trigger (next to Enabled). We only want this trigger to be on while the unit has the Frenzy buff.
  • Frenzy Timer
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
      • (FrenzyUnit has buff Frenzy) Equal to False
    • Actions
      • Special Effect - Destroy FrenzySfx
      • Trigger - Turn off (This trigger)
Note that these Triggers aren't MUI, which means that this design won't work for multiple units at the same time.

This is because FrenzyUnit and FrenzySfx are global variables, and global variables can only have 1 value set at a time (WITHOUT Arrays that is). So basically, whenever a unit casts Frenzy, FrenzyUnit and FrenzySfx are set to the casting Unit and IT'S newly created Special Effect. If another Unit was already using FrenzyUnit/FrenzySfx then these variables will become unset for it. This can prevent the FrenzySfx from ever being destroyed for that unit.
 

Attachments

  • Frenzy Example.w3m
    16.9 KB · Views: 35
Last edited:
Level 9
Joined
Apr 22, 2020
Messages
430
Cool you have screenshots now but i have a few questions sorry for keep asking you but the "FrenzyUnit" in (FrenzyUnit has buff Frenzy) how did you get that? did you Edit Variable? And how did you get the FrenzySfx and if they are made with variables i want to know the Functions And Variables and by the way i cannot open your map its said level info data missing or invalid.
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,272
FrenzyUnit = Unit variable
FrenzySfx = Special Effect variable

FrenzyUnit has buff Frenzy = A Boolean Comparison. It should say: Unit Has Specific Buff.

Press Control + B to open the Variable Editor. In there you can create a new Variable and choose it's type. Simply select the correct type (Unit/Special Effect) and name it whatever you think fits.
 
Level 9
Joined
Apr 22, 2020
Messages
430
Multiple options:
Dynamic Indexing
Unit Indexer <- Best option for this specific type of effect

Learn about using Arrays and these systems to make MUI spells
Do you mean the GUI Unit Indexer Tool? Well i have heard of it but have never used it but can this tool make the trigger you made MUI?
 
Level 9
Joined
Apr 22, 2020
Messages
430
Links in my signature, and yes, that's the idea behind Indexing.
Well I don't really want to bother you anymore but since you you know how to make this trigger MUI using this tool can you teach me how to do it I PROMISE that this is the last that i'm gonna be bothering you:grin:
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,272
So this is what an MUI version of the trigger looks like in conjunction with a Unit Indexer.

Note that I no longer needed the FrenzyUnit variable, but I did need a new variable: FrenzyGroup (Unit Group).
  • Frenzy Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frenzy
    • Actions
      • Set VariableSet Id = (Custom value of (Triggering unit))
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Frenzy) Equal to True
        • Then - Actions
          • Special Effect - Destroy FrenzySfx[Id]
        • Else - Actions
          • Unit Group - Add (Triggering unit) to FrenzyGroup
      • -------- --------
      • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
      • Set VariableSet FrenzySfx[Id] = (Last created special effect)
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Frenzy Timer <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Frenzy Timer <gen>
        • Else - Actions
  • Frenzy Timer
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FrenzyGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Frenzy) Equal to False
            • Then - Actions
              • Set VariableSet Id = (Custom value of (Picked unit))
              • Special Effect - Destroy FrenzySfx[Id]
              • Unit Group - Remove (Picked unit) from FrenzyGroup.
            • Else - Actions
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FrenzyGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
All the Unit Indexer does is assign each unit a unique custom value. This is useful because you can then plug a unit's custom value into the [Index] of a Variable Array, and create unique versions of that variable that are linked to that unit.

In other words, this method allows you to save data to a unit. If you've ever wanted custom stats like Protoss Shields or Charisma, Luck, Ability Power, etc... then this is what you were looking for. But it can keep track of any data, not just stats, such as keeping track of a Special Effect on a unit like I'm doing in my triggers.

In this case I'm "linking" the special effect to the caster, by using the caster's custom value as the Index in the Special Effect variable (FrenzySfx).
 
Last edited:
Level 9
Joined
Apr 22, 2020
Messages
430
What kind of actions are those that are just ------- -------? And since this tool is like an improved version of triggers will this replace the original triggers to this one when imported to your map?
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,272
That's just a Comment, you can type anything you want in there to leave yourself notes/reminders/explanations. I use them to separate Actions so it's easier to read. to read.

And i'm not too sure I fully understand your second question.

All you have to do is copy and paste the Unit Indexer trigger into your map and it will automatically do it's thing. You don't need to worry about anything else.

Well, there is one small potential problem, and that's if you were using Custom Value in your other triggers already:
  • Unit - Set the custom value of (Triggering unit) to 0
Most people never use this though and you shouldn't use it after importing the Unit Indexer.

Oh, and make sure that you have "Automatically create unknown variables" in your File/Preferences/General settings in the World Editor before you copy and paste triggers into your map.
 
Last edited:
Level 9
Joined
Apr 22, 2020
Messages
430
That's just a Comment, you can type anything you want in there to leave yourself notes/reminders/explanations. I use them to separate Actions so it's easier to read, at least I find it easier to read.

And i'm not too sure I fully understand your second question.

All you have to do is copy and paste the Unit Indexer trigger into your map and it will automatically do it's thing. You don't need to worry about anything else.

Well, there is one small potential problem, and that's if you were using Custom Value in your other triggers already:
  • Unit - Set the custom value of (Triggering unit) to 0
I assume you never used this though.
Do you mean i do not need to import in the import manager and just copy paste the Unit Index Trigger but where should i paste the Unit Index Trigger?
 
Level 9
Joined
Apr 22, 2020
Messages
430
Just copy and paste the triggers into your map. They go into the Trigger Editor, anywhere you want.

Import triggers = copy and paste, sorry for the confusion.
Thank you So Much Uncle you really REALLY helped me a lot today this is the first time i have ever made a trigger and unexpectedly the first that i have succeded so i will try this tool tomrrow since its night time in our country and i need to go to sleep so Thank You so much Uncle I may not know what i would do without you:grin::grin::grin::thumbs_up::thumbs_up::thumbs_up:
 
Level 9
Joined
Apr 22, 2020
Messages
430
Oh sorry i forgot to ask should i delete the previous trigger that you made and make a new one but with the Unit Indexer trigger imported in the trigger editor?
 
Level 9
Joined
Apr 22, 2020
Messages
430
1) Delete everything related to the previous trigger.
2) Copy and paste the Unit Indexer folder into your map.
3) Copy and paste the new trigger folder into your map.
I'm in my laptop right now and you said to copy and paste the Unit Indexer folder to my map but there is also a folder called Test should i copy paste it to my map too?
 
Level 9
Joined
Apr 22, 2020
Messages
430
You don't have to copy Test, it's just there to show you how an example of how the system works.
Okay but can i import the Unit Indexer File on 2 Maps at the same time?because when i got to the Unit Indexer map the human units turned into fel orcs which is related to the first map which i tried to import it because im making fel orcs is this a bug?also it copies the spells on my previous map.
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,272
Click the Unit Indexer folder, press Control + C (copy), then go to file and find and open your map. In your map go into the trigger editor and click on the name of your map (button at the very top) or on any trigger/folder and press Control + P (paste).

The Unit Indexer is just like any other trigger, it's nothing special. As long as it's in your Trigger Editor it will work.

Remember, you aren't using the Asset Manager, that's not what people mean they say say Importing triggers.
 
Level 9
Joined
Apr 22, 2020
Messages
430
Click the Unit Indexer folder, press Control + C (copy), then go to file and find and open your map. In your map go into the trigger editor and click on the name of your map (button at the very top) or on any trigger/folder and press Control + P (paste).


The Unit Indexer is just like any other trigger, it's nothing special. As long as it's in your Trigger Editor it will work.

Remember, you aren't using the Asset Manager, that's not what people mean they say say Importing triggers.
Okay thanks and by the way whats the "Id" in "Set Variable Id in the actions? I suppose thats a Variable but what is inside it? I meant what's id the array and variable type?
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,272
Id is an Integer. I set it to be equal to the Triggering Unit's and Picked Unit's custom value.

It's not required, it's just something I use to make it easier/more organized.

Alternatively, you could replace all instances of Id with "custom value of triggering/picked unit", it'd result in the same exact thing.

The Unit Indexer gives every single unit a unique custom value, it's like numbering the units. No two units will ever have the same number. This is useful because it allows you to use a unit's custom value as the Index [] in a variable Array, essentially giving each unit their own version of that variable.
 
Last edited:
Level 9
Joined
Apr 22, 2020
Messages
430
Id is an Integer. I set it to be equal to the Triggering Unit's and Picked Unit's custom value.

It's not required, it's just something I use to make it easier/more organized.

Alternatively, you could replace all instances of Id with "custom value of triggering/picked unit", it'd result in the same exact thing.

The Unit Indexer gives every single unit a unique custom value, it's like numbering the units. No two units will ever have the same number. This is useful because it allows you to use a unit's custom value as the Index [] in an Array, essentially giving each unit their own version of that variable.
Ohh..... Okay pls don't leave this thread yet i will try to make this trigger right now and i might ask for your guide. Once i have succesfully made this trigger would this thread be cased closed.
 
Level 9
Joined
Apr 22, 2020
Messages
430
Helloo again Uncle i have finally made the trigger and i tested it and it worked multiple units can now have the special effect on thier while being casted again by another unit but there is a slight problem the special buff effect won't disappear even if the frenzy effect is already finish do you know how to fix this?
 
Level 9
Joined
Apr 22, 2020
Messages
430
  • Fremzy Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Light Signet
    • Actions
      • Set id[0] = (Custom value of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Light Signet buff ) Equal to True
        • Then - Actions
          • Special Effect - Destroy FrenzySfx[id[0]]
        • Else - Actions
          • Unit Group - Add (Triggering unit) to FrenzyGroup
      • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using war3mapImported\PowerInfusion_Higher.mdx
      • Set FrenzySfx[id[0]] = (Last created special effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Fremzy Cast <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Frernzy Timer <gen>
        • Else - Actions


  • Frernzy Timer
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FrenzyGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Light Signet buff ) Equal to False
            • Then - Actions
              • Set id[0] = (Custom value of (Picked unit))
              • Special Effect - Destroy FrenzySfx[id[0]]
              • Unit Group - Remove (Picked unit) from FrenzyGroup
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in FrenzyGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions

Sorry for the long response. by the way Light Signet Means the Frenzy ability I just renamed it.
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,272
I noticed you gave id an Array []. That's fine, but it's not necessary.

Everything looks fine to me, are you sure Light Signet buff is setup properly in the Object Editor? Maybe the Light Signet ability is still using the old buff.

If not, maybe the PowerInfusion_Higher model has issues with being destroyed.

Another fix you can try is to move the Action "Add (Triggering unit) to FrenzyGroup" to outside of the Else - Actions. You can move it right below where you set id.
 
Level 9
Joined
Apr 22, 2020
Messages
430
I noticed you gave id an Array []. That's fine, but it's not necessary.

Everything looks fine to me, are you sure Light Signet buff is setup properly in the Object Editor? Maybe the Light Signet ability is still using the old buff.

If not, maybe the PowerInfusion_Higher model has issues with being destroyed.

Another fix you can try is to move the Action "Add (Triggering unit) to FrenzyGroup" to outside of the Else - Actions. You can move it right below where you set id.
Hahahahahaha Oh My God the most stupid mistake i have ever done didn't you see in my triggers that "Frenzy Caster <gen> is on) = to false when it is suppose to be "Frenzy Timer <gen> oh my what a mistake:xxd::xxd::xxd:
 
Level 9
Joined
Apr 22, 2020
Messages
430
Thank you so so so so much for helping me Uncle rep+++++ you deserve it!

Edit:Sorry only 1 reputation point is given but it said the maximum is 1 i dont really know why.
 
Status
Not open for further replies.
Top