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.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top