1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Base abilities for custom spells cast by melee-game AI units

Discussion in 'JASS/AI Scripts Tutorials' started by Boris_Spider, Apr 11, 2011.

  1. Mr_Bean

    Mr_Bean

    Joined:
    Feb 11, 2011
    Messages:
    1,823
    Resources:
    6
    Maps:
    2
    Spells:
    4
    Resources:
    6
    Why is this the case? I always use the one you said not to use :grin:
    I found that if you add the expiration before ordering the unit to cast, it doesn't cast for some reason (maybe 1 second is too short?). But what is wrong with using the one you said not to?

    You must also add this line:
    • AI - Ignore (Last created unit)'s guard position

    If you don't then the computer will tell the dummy to do something else, therefore stopping it from casting its spell.

    Also, you set the trigger to set the level of the dummy's ability to the level of Chain Lightning for the casting unit, but the condition says:
    • (Ability being cast) Equal to Storm Bolt
     
  2. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    do I really have to prove that mr bean???...
     

    Attached Files:

  3. Mr_Bean

    Mr_Bean

    Joined:
    Feb 11, 2011
    Messages:
    1,823
    Resources:
    6
    Maps:
    2
    Spells:
    4
    Resources:
    6
    From your test map I learned that the enemy's priest didn't cast because you didn't ignore it's guard position. What were you actually trying to prove?

    EDIT: Okay, so it works if you put the expiration timer just after the unit is created and not at the end.
     
  4. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    and why would you add another line of code (AI - ignore...) and make it 8 lines insead of 7?, it's useless and slower...
     
  5. Mr_Bean

    Mr_Bean

    Joined:
    Feb 11, 2011
    Messages:
    1,823
    Resources:
    6
    Maps:
    2
    Spells:
    4
    Resources:
    6
    So that if the owner of the dummy is controlled by a computer player, the dummy will still cast the ability. If the owner is a computer and you leave out this line THE ABILITY WON'T BE CAST.
     
  6. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    instead of adding another line, just re-arrange the ORDER of the trigger, stated in post#21...

    like I said, adding another line (AI - ignore...) is useless and slower...
     
  7. Cosmas

    Cosmas

    Joined:
    Aug 12, 2010
    Messages:
    84
    Resources:
    0
    Resources:
    0
    Useful in melee maps and totaly useless in custom map. All spells are used only if someone from pc team near spell caster is in combat, it is easier to use trigger if unit is attacked then and no need to disable dummy unit from controll.
     
    Last edited: Sep 9, 2011
  8. Tirlititi

    Tirlititi

    Joined:
    Jul 11, 2010
    Messages:
    396
    Resources:
    12
    Models:
    6
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    12
    Watch it more closely, Cosmas. The IA for spells is really tricky and more complex than most of triggers you can make for simple creeps.

    About the "AI - Ignore guard position", I never had this problem and I think the computer shouldn't use dummies if they are well-made.
     
  9. Boris_Spider

    Boris_Spider

    Joined:
    Dec 12, 2009
    Messages:
    728
    Resources:
    6
    Icons:
    3
    Maps:
    2
    Tutorials:
    1
    Resources:
    6
    I've got final exams next week, but after those I'll finally have the time to work on this tut. So far there's been a lot of positive feedback about it.

    //\\^^//\\
     
  10. HuanAk

    HuanAk

    Joined:
    Apr 26, 2011
    Messages:
    404
    Resources:
    1
    Maps:
    1
    Resources:
    1
    This list is very helpful.

    but I think it may depend on map or setting too ?

    because in my map, Chain Lightning, Storm Bolt never cast by AI. and I have to put them into Orb with 100% chance to cast.

    -----

    lots of ability do not work on orb too.

    anyone know the rules to decide what type of ability will work/not work on Orb? (eg, put them into Orb ability with 100% chance to cast).
     
  11. Boris_Spider

    Boris_Spider

    Joined:
    Dec 12, 2009
    Messages:
    728
    Resources:
    6
    Icons:
    3
    Maps:
    2
    Tutorials:
    1
    Resources:
    6
    Chain Lightning won't cast if the damage is set as "0".

    I haven't looked into orb abilities yet, I will.

    I will probably have time to finish this tut in about a month, if not sooner. I have been working on it, but haven't posted the update yet. I'll be laid off next month and time will be the only thing I have for the 2-3 weeks until I rotate back to school.

    \\//xx\\//
     
  12. Shyrony

    Shyrony

    Joined:
    Oct 8, 2010
    Messages:
    6
    Resources:
    7
    Models:
    7
    Resources:
    7
    Don't forget about Death coil, it's treated just like Holy light, but for opposite targets.
    Slow is also casted at any nearly foes as fast as how many foe there are, mana (if it use any), and cooldown.
     
  13. Boris_Spider

    Boris_Spider

    Joined:
    Dec 12, 2009
    Messages:
    728
    Resources:
    6
    Icons:
    3
    Maps:
    2
    Tutorials:
    1
    Resources:
    6
    I've added Death Coil. I'm currently looking into Slow, but I believe you're correct.

    Thank you for contributing!

    //\\oo//\\
     
  14. Weigazod

    Weigazod

    Joined:
    Feb 22, 2009
    Messages:
    176
    Resources:
    0
    Resources:
    0
    Raise dead is only use in combat only, not at every cooldown.

    War Stomp/Thunder Clap will not be used if enemies around is air units.

    Mirror Image will be used if the unit is attacked. (Those damn blademasters always do this to me)
     
  15. ratel

    ratel

    Joined:
    Apr 7, 2012
    Messages:
    63
    Resources:
    0
    Resources:
    0
    Thank you,now I will be able to set the creeps to cast spells on heroes even if they are single:)
     
  16. gjpaixao13

    gjpaixao13

    Joined:
    Apr 13, 2011
    Messages:
    13
    Resources:
    0
    Resources:
    0
    Some Tips



    Hello!!!
    Great post, I've memorized all these spells and when to use then through the years ! :ogre_haosis:

    Well, as for the Orb abilities, as for some auto-cast spells as Searing Arrows etc... I found that it bugs when the unit auto-target other unit.
    To put it simple, turn Advanced Unit Control on the Ally property to test, and you must be on the same team as the tested player ofc.
    Now, make the spell auto-cast and use it on a enemy.The spell will work fine and the CD wil fire.
    But, put 2 units and order yours to attack ONE of them.After it killed that unit, yours will auto-target the other, but the CD wil NOT FIRE.
    This happens with orb effects as spells(Slow,Purge etc Item Spells transformed to unit or hero spell).

    I have other spells tested too.

    Black Arrow and Parasite - > The ai normally uses it when the targe is dying, perhaps to spawn the unit faster giving that the target is almost dead.

    Searing Arrows -> Uses it whenever the CD is off.

    Cold Arrows -> PREFERED over Searing Arrows in the case the hero/unit has both spells.

    Shadow Strike -> Uses when the target has less then % of his health.Never study to see the right %, but I never saw it using on a 100% target.

    Dark Portal (Archimonde) -> Uses whenever is available.

    Finger of Death -> Uses whenever is available

    Starfall -> Uses when there is 2 or more enemy units close.

    HOLY LIGHT/DEATH COIL -> One thing I notice, while doing some Tank/Spank boss fights , is that if the hero is taken a LOT more damage then the heal, the healer or himself(if he has this spell) STOPS casting it.

    That said, thz for this post ! And +rep :thumbs_up:
     
  17. peter1987kh2

    peter1987kh2

    Joined:
    Jul 29, 2012
    Messages:
    4
    Resources:
    0
    Resources:
    0
    Help

    My english not very good, i am from malaysia
    I add a "attribute bonus" and a self make skill to all heros
    I change the level limit to 100
    I realise that, they wont self use the attribute bonus and the skill that add into them.

    how? Can you help me?:goblin_cry:
     
  18. Weigazod

    Weigazod

    Joined:
    Feb 22, 2009
    Messages:
    176
    Resources:
    0
    Resources:
    0
    Well, there are two ways but i do not have time to tell you in detail so you will have to learn how to do it in Hiveworkshop tutorial.

    First, you use AI campaign.

    Second, you can use trigger to make them do so.
     
  19. peter1987kh2

    peter1987kh2

    Joined:
    Jul 29, 2012
    Messages:
    4
    Resources:
    0
    Resources:
    0
    OK, I will try, but can you give me the link of Hiveworkshop tutorial?
     
  20. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    attribute can't be 'used', they can only be 'learned' so you have to trigger it...