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 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 The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      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