Illusion ability like Dota's PL

kelogsloops

You can change this now in User CP.
Reaction score
45
Okay so I made an ability and based it off Brilliance Aura. the ability gives the hero passive armor piercing which was a second ability i added through triggering and that works, but most of all, this ability allows the hero to create illusions passively with X chance of occuring, like PL's illusion spell.

This is my coding

Trigger:
  • Crystalline Focus Add
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Crystalline Focus X
    • Actions
      • Unit - Add Crystalline Focus to (Triggering unit)
      • Unit - Set level of Crystalline Focus for (Triggering unit) to (Level of Crystalline Focus X for (Triggering unit))


Trigger:
  • Make Illusion
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Level of Crystalline Focus for (Attacking unit)) Equal to 1
          • (Level of Crystalline Focus for (Attacking unit)) Equal to 2
          • (Level of Crystalline Focus for (Attacking unit)) Equal to 3
          • (Level of Crystalline Focus for (Attacking unit)) Equal to 4
      • (Random integer number between 1 and 100) Less than or equal to (25 x (Level of Crystalline Focus for (Attacking unit)))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in IllusionNumber) Less than or equal to 6
        • Then - Actions
          • Set Temp_loc = (Position of (Attacking unit))
          • Unit - Create 1 Dummy Test Visible for (Owner of (Attacking unit)) at Temp_loc facing Default building facing degrees
          • Unit Group - Add (Last created unit) to IllusionNumber
          • Hero - Create Wand of Illusion and give it to (Last created unit)
          • Set item = (Last created item)
          • Hero - Order (Last created unit) to use item on (Attacking unit)
          • Unit - Add a 10.01 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_Temp_loc)
          • Wait 10.01 seconds
          • Unit Group - Remove (Last created unit) from IllusionNumber
        • Else - Actions
          • Do nothing


The thing is, i want it to limit to 6 illusions. Each illusion lasts for 10 seconds and an invisible dummy has a generic timer of 10 seconds, so that each dummy 'acts' as a number in the unit group for the illusion since i can't add an illusion to the unit group. It starts off fine, except that it maxes at 7 illusions for some strange reason, then when those all die, it makes 6 or 5 illusions max i think, and then it stops working.
 

ultimate11

Active Member
Reaction score
25
Trigger:
  • Spell
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Crystalline Focus for (Attacking unit)) Greater than or equal to 1
      • (Random integer number between 1 and 100) Less than or equal to ((Level of Crystalline Focus for (Attacking unit)) x 25)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • count[(Player number of (Owner of (Attacking unit)))] Less than 7
        • Then - Actions
          • Set count[(Player number of (Owner of (Attacking unit)))] = (count[(Player number of (Owner of (Attacking unit)))] + 1)
          • Set Point = (Position of (Attacking unit))
          • Unit - Create 1 Footman for (Owner of (Attacking unit)) at Point facing Default building facing degrees
          • Unit - Add a 0.40 second Generic expiration timer to (Last created unit)
          • Unit - Turn collision for (Last created unit) Off
          • Hero - Create Wand of Illusion and give it to (Attacking unit)
          • Hero - Order (Last created unit) to use (Last created item) on (Attacking unit)
          • Custom script: call RemoveLocation(udg_Point)
        • Else - Actions

Trigger:
  • Rule
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is an illusion) Equal to True
    • Actions
      • Set count[(Player number of (Owner of (Triggering unit)))] = (count[(Player number of (Owner of (Triggering unit)))] - 1)


is a quite fast trigger is based to work for many heroes not only for one.You can also add a custom value to illisions...making more easy for you to recognize them to second trigger.It should work fine.

Regards
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
Okay so I made an ability and based it off Brilliance Aura. the ability gives the hero passive armor piercing which was a second ability i added through triggering and that works, but most of all, this ability allows the hero to create illusions passively with X chance of occuring, like PL's illusion spell.

This is my coding

Trigger:
  • Crystalline Focus Add
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Crystalline Focus X
    • Actions
      • Unit - Add Crystalline Focus to (Triggering unit)
      • Unit - Set level of Crystalline Focus for (Triggering unit) to (Level of Crystalline Focus X for (Triggering unit))


Trigger:
  • Make Illusion
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Level of Crystalline Focus for (Attacking unit)) Equal to 1
          • (Level of Crystalline Focus for (Attacking unit)) Equal to 2
          • (Level of Crystalline Focus for (Attacking unit)) Equal to 3
          • (Level of Crystalline Focus for (Attacking unit)) Equal to 4
      • (Random integer number between 1 and 100) Less than or equal to (25 x (Level of Crystalline Focus for (Attacking unit)))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in IllusionNumber) Less than or equal to 6
        • Then - Actions
          • Set Temp_loc = (Position of (Attacking unit))
          • Unit - Create 1 Dummy Test Visible for (Owner of (Attacking unit)) at Temp_loc facing Default building facing degrees
          • Unit Group - Add (Last created unit) to IllusionNumber
          • Hero - Create Wand of Illusion and give it to (Last created unit)
          • Set item = (Last created item)
          • Hero - Order (Last created unit) to use item on (Attacking unit)
          • Unit - Add a 10.01 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_Temp_loc)
          • Wait 10.01 seconds
          • Unit Group - Remove (Last created unit) from IllusionNumber
        • Else - Actions
          • Do nothing


The thing is, i want it to limit to 6 illusions. Each illusion lasts for 10 seconds and an invisible dummy has a generic timer of 10 seconds, so that each dummy 'acts' as a number in the unit group for the illusion since i can't add an illusion to the unit group. It starts off fine, except that it maxes at 7 illusions for some strange reason, then when those all die, it makes 6 or 5 illusions max i think, and then it stops working.

As pointed out the reason this doesn't work is because of the wait, that is screwy. What you want to do is eliminate the wait, but you can do it simply by using a trigger such as:

Trigger:
  • Crystalline Focus Add
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Crystalline Focus X
    • Actions
      • Unit - Add Crystalline Focus to (Triggering unit)
      • Unit - Set level of Crystalline Focus for (Triggering unit) to (Level of Crystalline Focus X for (Triggering unit))


Trigger:
  • Make Illusion
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Level of Crystalline Focus for (Attacking unit)) Equal to 1
          • (Level of Crystalline Focus for (Attacking unit)) Equal to 2
          • (Level of Crystalline Focus for (Attacking unit)) Equal to 3
          • (Level of Crystalline Focus for (Attacking unit)) Equal to 4
      • (Random integer number between 1 and 100) Less than or equal to (25 x (Level of Crystalline Focus for (Attacking unit)))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GroupCount) Less than or equal to 6
        • Then - Actions
          • Set Temp_loc = (Position of (Attacking unit))
          • Unit - Create 1 Dummy Test Visible for (Owner of (Attacking unit)) at Temp_loc facing Default building facing degrees
          • Unit Group - Add (Last created unit) to IllusionNumber
          • Set GroupCount = GroupCount + 1
          • Hero - Create Wand of Illusion and give it to (Last created unit)
          • Set item = (Last created item)
          • Hero - Order (Last created unit) to use item on (Attacking unit)
          • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_Temp_loc)
        • Else - Actions
          • Do nothing


Trigger:
  • Events
    • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in IllusionNumber) Equal to True
    • Actions
      • Set GroupCount = ((Number of units in IllusionNumber) - 1)


That should work, also i would advise you to download the GDD damage detection, as this can be abused to make illusions, because the event unit is attacked is unreliable.
 

ultimate11

Active Member
Reaction score
25
GDD is use to detect a damage and is good.It`s true unit attacked event recognize when event its start but dont recognize when it`s finished.
I think that my trigger is simpliest to use.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
GDD is use to detect a damage and is good.It`s true unit attacked event recognize when event its start but dont recognize when it`s finished.
I think that my trigger is simpliest to use.

It's simple yes, but what if there is an item that makes illusions? Then the count will go down even if those illusions are not the part of the original spell. Even worse, what if the hero has multiple illusion spells, then all of them will be affected. In this way only this group is considered.
 

Ayanami

칼리
Reaction score
288
Just to simplify the above trigger:

Trigger:
  • Crystalline Focus Add
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Crystalline Focus X
    • Actions
      • Unit - Add Crystalline Focus to (Triggering unit)
      • Unit - Set level of Crystalline Focus for (Triggering unit) to (Level of Crystalline Focus X for (Triggering unit))


Trigger:
  • Make Illusion
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Crystalline Focus for (Attacking unit)) Greater than 0
      • (Random integer number between 1 and 100) Less than or equal to (25 x (Level of Crystalline Focus for (Attacking unit)))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (GroupCount) Less than or equal to 6
        • Then - Actions
          • Set Temp_loc = (Position of (Attacking unit))
          • Unit - Create 1 Dummy Test Visible for (Owner of (Attacking unit)) at Temp_loc facing Default building facing degrees
          • Unit Group - Add (Last created unit) to IllusionNumber
          • Set GroupCount = GroupCount + 1
          • Custom Script: call IssueTargetOrderById(GetLastCreatedUnit(), 852274, GetAttacker())
          • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_Temp_loc)
        • Else - Actions


Trigger:
  • Illusion Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in IllusionNumber) Equal to True
    • Actions
      • Set GroupCount = ((Number of units in IllusionNumber) - 1)


You don't need to create the wand of illusion and give it to the dummy unit. Simply, change the "Item - Illusion" ability into a unit ability and give it to the dummy.

As mentioned above, this doesn't detect a proper attack dealt. To detect a proper attack, you'd need to use a damage detection system (GDD) coupled with a Buff Placer.
 

ultimate11

Active Member
Reaction score
25
It's simple yes, but what if there is an item that makes illusions? Then the count will go down even if those illusions are not the part of the original spell. Even worse, what if the hero has multiple illusion spells, then all of them will be affected. In this way only this group is considered.

I say it.He can set a specific custom value to that illusions,and in second trigger when an ilusion die to add an extra condition like
Trigger:
  • cutom value of triggering unit egual to 10
for exemple
 

Ayanami

칼리
Reaction score
288
I say it.He can set a specific custom value to that illusions,and in second trigger when an ilusion die to add an extra condition like
Trigger:
  • cutom value of triggering unit egual to 10
for exemple

Just a simple Unit group will suffice. However, that will work too. But, it might clash with other units with the same Custom Value, especially when Custom Value is used elsewhere.
 

ultimate11

Active Member
Reaction score
25
Just a simple Unit group will suffice. However, that will work too. But, it might clash with other units with the same Custom Value, especially when Custom Value is used elsewhere.

it`s less prosible but we are right both of us.he can choose what he want :thup:
 

kelogsloops

You can change this now in User CP.
Reaction score
45
OH SORRY for hte slow reply. Umm. i'm reading through all the triggers but big question, how do you make a unit use an item ability thats been turned into a unit ability e.g. item illusion int oa unit ability? i mean, in the 'Issue Unit an Order to a Unit' or something, whre is it?
 

Ayanami

칼리
Reaction score
288
OH SORRY for hte slow reply. Umm. i'm reading through all the triggers but big question, how do you make a unit use an item ability thats been turned into a unit ability e.g. item illusion int oa unit ability? i mean, in the 'Issue Unit an Order to a Unit' or something, whre is it?

You can do it in JASS, like stated above. This is for "Item - Illusion"

Trigger:
  • Actions
    • Custom Script: call IssueTargetOrderById(udg_MyCastingUnit, 852274, udg_MyTargetUnit)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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

      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