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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  4. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  5. 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.

Autocast custom skills (for computers/AI)

Discussion in 'World Editor Help Zone' started by B0K0, Jan 13, 2009.

  1. B0K0

    B0K0

    Joined:
    Feb 10, 2008
    Messages:
    11
    Resources:
    0
    Resources:
    0
    Hi everyone,

    How can a unit autocast a custom skill? (Like the wizards from castle fight).

    For example a shaman that can autocast a customized chain lightning named Lightning stikes.

    Greetz!!
     
  2. Edgecrusher021

    Edgecrusher021

    Joined:
    Dec 18, 2008
    Messages:
    36
    Resources:
    0
    Resources:
    0
    I havn't messed around with autocasting abilities as of yet but it doesnt look like it allows you to edit that property in the object editor. I would make a dummy spell based on an autocast spell (i.e. faerie fire: but alter stats so it does nothing). Then make a trigger that runs whenever that ability is cast. In the trigger create a dummy unit, give it the chain lightning, and have him cast it on the target unit. It should be pretty simple.
     
  3. Day-Elven

    Day-Elven

    Joined:
    Apr 3, 2008
    Messages:
    699
    Resources:
    0
    Resources:
    0
    While autocasting, you can't catch target unit / point of ability being cast with triggers, as I know.
     
  4. D3zmodos

    D3zmodos

    Joined:
    Aug 9, 2008
    Messages:
    66
    Resources:
    0
    Resources:
    0
    Cant you just add it to the "Default active ability" field?
     
  5. Slaydon

    Slaydon

    Joined:
    Jan 6, 2008
    Messages:
    2,432
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Use one of the Range things the Nigth elf heroes got.. and edit it.
     
  6. Day-Elven

    Day-Elven

    Joined:
    Apr 3, 2008
    Messages:
    699
    Resources:
    0
    Resources:
    0
    How can he edit fire arrow to chain lighting? (or what do you mean?)

    I would make it like:
    __________________________________________
    If
    Shaman's mana >= <Spell mana cost>

    Then:
    Create dummy
    Order dummy to cast chain lighting
    Set mana of shaman = mana of shaman - <Spell mana cost>
    __________________________________________

    Note 1: don't forget to remove memry leak (location)
    Note 2: You can make for shaman a skill, that will do nothing, with a description of chain lighing that will be casted by dummy.
    Note 3: This spell is MUI, causedummy needs some time to cast a spell. Use local location for the point where dummy will be created.
     
  7. B0K0

    B0K0

    Joined:
    Feb 10, 2008
    Messages:
    11
    Resources:
    0
    Resources:
    0
    Thanks for the reply but the spell itself don't has to be autocast, I just need a trigger so that my unit will cast a unit owned spell automaticly when he gets in range of an enemy.

    Thanks.
     
  8. Slaydon

    Slaydon

    Joined:
    Jan 6, 2008
    Messages:
    2,432
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Wait, doesn't the Campaign Units got a Healing spell.