Tryin to make a spell MUI

Exfyre

hmm...
Reaction score
60
Hey I thought of an idea for a spell which I am attempting now; however, i have run into MUI problems and need help! Here is the spell:

Hurls a dagger from a short distance that infects the target unit dealing damage every second. Whenever an infected unit touches another unit, this unit also becomes infected. A unit can be affected twice.

Here is my code so far:

Trigger:
  • Diffusive Poison
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Diffusive Poison [shell, triggered]
    • Actions
      • Custom script: local trigger poison = gg_trg_DPsnAct
      • Trigger - Add to (poison) the event (Unit - A unit comes within 100.00 of (Target unit of ability being cast))

Trigger:
  • DPsnAct
    • Events
    • Conditions
    • Actions
      • Set tempLoc = (Position of (Triggering unit))
      • Unit - Create 1 Dummy Caster for (Owner of (?)) at tempLoc facing Default building facing (270.0) degrees

(there are 6 levels to this spell)
EDIT:
I used Shadow strike as the triggering spell, and I want the dummy unit to cast this spell when it detects a unit within 100 range.
EDIT:
changed spell to not required lessened damage.
 

Dirac

22710180
Reaction score
147
2 Triggers

Code:
Event
A unit starts the effect of an ability)

Condition
Ability being cast equal to Strong Poison

Action
Set (Targeted_Unit)=Target unit of ability being cast
and

Code:
Event
Every 0.1 seconds

Condition
(Targeted_Unit) has buff = Strong Poison

Action
Pick every unit within 100 from (Targeted_Unit)
Create 1 dummy next to them
Add (weak poison) to dummy
order dummy to (weak poison) picked unit
 

averes

New Member
Reaction score
17
Unless my acronyms are wrong MUI is multiple unit instances, so the above post wouldnt work (it would only work for 1 unit). If you want to stay within the GUI and not work with local variables make the variable "Targeted_Unit" an array. Whenever a unit is hit with the ability add them to the next spot in the array, use a variable to check the slot your at. Then in the periodic trigger cycle through the array and do the pick every unit blah blah for each unit in the array. I'd suggest making sure the unit your checking is alive before you do the pick every unit within X radius.
 

Exfyre

hmm...
Reaction score
60
that works to some extent, but not exactly what I'm looking for. First of all it isn't MUI (you're right averes), and second i want it to cast the same spell so that the newly infected units can infect others also, but thank you for the help and +rep.
I've decided I don't want it to do less damage to each unit (because that would require more effort), and ill just make the original DPS less.

Welcoming other ideas please.
 

averes

New Member
Reaction score
17
What Dirac posted can still be used. Just replace lesser poison with your original poison spell. In the spreading trigger make it periodic, make it look through all units on the map that have the poison buff and do the thing about spreading, within 100 range or w/e. Then whenever a unit is infected add 1 to its custom value. If a units custom value is equal to 2, don't infect it again. Then have a third trigger, periodic, that looks at the infected units and deals periodic damage to them based on there custom value.

This method would require 3 triggers and two spells. The original spell would be the dagger. When the dagger was cast on someone the second spell, the poison would be cast on them to.
 

averes

New Member
Reaction score
17
Actually less damage from spreads wouldn't be much harder. In fact, you could set it up this way, which I think would be pretty cool.

A unit takes damage based on there custom value. The amount thats added to a units custom value when they become infected is equal to half of the infecting units custom value, with a maximum custom value of 2. This way since damage is based on custom value youd have a disease that spreads and starts out dealing less damage to each unit thats infected, but as there infected multiple times the damage there dealt would grow.

If you did this I'd suggest removing the cap of two infections, and just make it so the only thing capped is custom value, and thus damage.
 

Exfyre

hmm...
Reaction score
60
Well, thank you both (and +rep if i can), for helping. I finally got it to work exactly how i planned (just now).
If you're interested, here is the code. I decided not to make it MUI because I only plan to let each player get only one of each hero, BUT if someone would like to show me how to make it MUI, I will glady +rep.

Trigger:
  • Diffusive Poison Spread
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set unitGroup = (Units in (Playable map area) matching (((Matching unit) has buff Diffusive Poison ) Equal to (==) True))
      • Unit Group - Pick every unit in unitGroup and do (Actions)
        • Loop - Actions
          • Set tempLoc = (Position of (Picked unit))
          • Set unitGroup2 = (Units within 100.00 of tempLoc matching ((((Matching unit) has buff Diffusive Poison ) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and ((Unit-type of (Matching unit)) Not equal to (!=) Dummy Caster))))
          • Custom script: call RemoveLocation(udg_tempLoc)
          • Unit Group - Pick every unit in unitGroup2 and do (Actions)
            • Loop - Actions
              • Custom script: local unit temp
              • Set tempLoc = (Position of (Picked unit))
              • Unit - Create 1 Dummy Caster for playerWhoHasWarden at tempLoc facing Default building facing (270.0) degrees
              • Custom script: call RemoveLocation(udg_tempLoc)
              • Custom script: set temp = bj_lastCreatedUnit
              • Unit - Add Diffusive Poison [trigger] to (temp)
              • Unit - Set level of Diffusive Poison [trigger] for (temp) to (Level of Diffusive Poison [shell] for heroArray[(Player number of playerWhoHasWarden)])
              • Unit - Order (temp) to Night Elf Warden - Shadow Strike (Picked unit)
              • Unit - Add a 3.00 second Generic expiration timer to (temp)
          • Custom script: call DestroyGroup(udg_unitGroup2)
      • Custom script: call DestroyGroup(udg_unitGroup)

Trigger:
  • Diffusive Cleanup
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Diffusive Poison [trigger]
    • Actions
      • Unit - Remove (Triggering unit) from the game
 

vypur85

Hibernate
Reaction score
803
Hmmm... What's with the locals (can you test game?)? You only used globals. No need to create the local variable. It'll just work the same. Removing the dummy caster is not a good idea. Expiration timer is good enough already. Removing it will cause killing bounty not recognisable, if the affected unit dies because of the spell.
 

Exfyre

hmm...
Reaction score
60
AH thank you. I was wondering why there was no bounty. +rep 4 u
EDIT: a question, though, how long should i make the expiration timer if i want bounty? if i set it too short the dummy is removed from the game before the unit dies (via expiration, right?).
 

vypur85

Hibernate
Reaction score
803
Depending on how long your Shadow Strike duration and you must also take into consideration the time needed for the missile to hit the target.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top