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. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  4. Rubbed the right way, the genie is out of its lamp! The 12th Concept Art Contest Results have been announced.
    Dismiss Notice
  5. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    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.

Introduction To Trigger-Enhancing Spells

Discussion in 'Trigger (GUI) Editor Tutorials' started by whitenights, Jul 27, 2004.

  1. whitenights

    whitenights

    Joined:
    Mar 25, 2004
    Messages:
    51
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    This tutorial will take you through the basics of trigger-enhancing a spell. Covered in this tutorial are:
    • Using a dummy spell
    • Creating Special Effects
    • Good habits when creating spells

    This tutorial assumes you have a very basic knowledge of the trigger editor and object editor. Trigger-enhanced spells vary widely, so this gives you basic skills to create a spell.

    1) You will first need an idea.
    In this tutorial, my idea is to create a mass-healing spell. The spell will target all units in an area and heal them. I want this to be a Hero ability.

    2) Then you will want to create a map to place this ability in.
    These maps are commonly called "testmaps" and they are what you download in the Spells area. The map dosn't need to be anything special. I usually create a 64x64 dirt map and make it better later. This tutorial will assume that you have made a blank map.

    3) You will then want to make a dummy ability.
    Explanations:
    If you are saying "HELP!!!!!!! What's a dummy ability", then a dummy ability is an ability that only costs you mana, has an icon, and has the tooltips for the user to see. In other words, it is only something that the end user clicks on. All of the work for this spell will be done by triggers.

    I want to use taunt for my dummy ability. I use taunt because taunt is an ability that works instantly. If you want to use a unit-targeted ability, Storm Bolt is good, and for a point-targeted spell, Shockwave works well.

    So what do I have to do to create my dummy ability? well, Taunt is a unit ability, so I have to make it a Hero ability. I also don't want the actual effect of Taunt (making all units attack my Hero). I also want to change the tooltips and such to make it sound like my ability.

    Step-by-Step:
    1. Open up the Object Editor
    2. Go to the Abilities tab
    3. Click the "New Custom Ability" button (the fist right above the "Destructables" tab)
    4. Set the Base Ability to Taunt. (If you can't see it, change "Hero" to "Unit").
    5. Set the name to Heal All (This could be anything you want)
    6. Start from the top and go down.
      • We don't want Taunt under Art - Caster, so get rid of that.
      • Let's change the Icon to Healing Wave.
      • The Area of Effect should be 0, so that the spell will not actually affect anyone.
      • The cooldown could be changed to 20 (seconds).
      • Let's change the Race to Human.
      • Change Targets Allowed to None.
      • Now lets do something else. Set Stats - Hero Ability to True.
      • Now scroll back up and set the Research Icon to Healing Wave.
      • Under Text, create Tooltips. Here were mine:
        • Text - Tooltip - Learn: "Learn Heal All"
        • Text - Tooltip - Learn - Extended: "Heal All will heal all units in a small area within your Hero."
        • Text - Tooltip - Normal: "Heal All"
        • Text - Tooltip - Normal - Extended: "Heal all units in a small area within your Hero"
    Now let's place that in a unit. I won't go over how to do that because it is really easy. I put it in a Paladin in place of Holy Light.

    4) Then you will create some triggers.
    Explanations: These triggers will have to figure out every unit within a range of the casting Hero, create a Heal special effect, and heal them for 100 hit points.

    Step-by-Step:
    1. Open the Trigger Editor and create a new trigger.
    2. Call the trigger "Heal All"

    Make one Event:
    • Unit - A unit Starts the effect of an ability

    Now, that will fire every time a unit casts an ability. The reason to use "Starts the effect of an ability" is because that will make the actions start once the mana has been deducted from a unit and the cooldown has started.

    We need to maks sure which ability is being cast, don't we? We wouldn't want the healing actions to start when you cast Divine Shield or any other ability, right? So let's create a Condition.
    • (Ability being cast) Equal to Heal All


    Now we create the meat of the triggers. The Actions. This is where everything happens. Follow along carefully or your ability will not work.

    • Unit Group - Pick every unit in (Units within 500.00 of (Position of (Casting unit))) and do (Actions)

    Whew... what did that do? It picked every unit within 500.00 of the Casting Unit and did (Actions) that we have not added yet. Let's go over a few important points. The Position of the Casting Unit is where the center of the range starts. You cannot do (Triggering unit) here. That is a common mistake. It MUST be (Casting unit). Now let's add some actions.

    • Loop - Actions
      • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 100.00)
      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Human\Heal\HealTarget.mdl


    Let's explain what went on there. First it set the life of the Picked Unit to the Life of the Picked unit plus 100. It then created a heal animation attached to the chest of the picked unit. (Abilities\Spells\Human\Heal\HealTarget.mdl is Heal under Abilities). This isn't really tough to understand compared to some spells.

    Good habits when creating spells:
    • Delete the Melee Initialization trigger. It's really easy to do and makes the spell look better.
    • KISS!!! KEEP IT SIMPLE, STUPID!!! This is the easiest way to make a trigger-enhanced healing spell.


    To test your beautiful spell:
    • Create the unit with the ability attached to it and make some units around it (damage them if you can).
    • Hit contol-F9 and enjoy.


    To make this spell better you could do some things:
    • Make the spell not target the Hero or any enemy units
    • Make better tooltips
    • Add 3 levels to it (maybe the range increases wih every level?)
    • Do some hotkeys for it.

    When you post your ability to the site:
    Keep the Hero alive (give him Ankh's of ressruection at the least). Give some creeps and units to test your ability on. Set the name, author, and desciption in the Map Properties menu. Make sure you set the Author to your user account. Make a screenshot (at least 256x256 pixels, usually more). Make a post immediatly after you submit so that you can post more info. about your spell. Keep the map description short and to the point and say everything you wanted to say in your post.

    :wink:
     
    Last edited by a moderator: Mar 28, 2007
  2. Tidus

    Tidus

    Joined:
    Jul 2, 2014
    Messages:
    1
    Resources:
    0
    Resources:
    0
    I CANT FUCKING DO THE FIRST LOOP ACTION ACTION I CAN ONLY DO

    Unit- Set life of (picked unit) to (life of (picked unit))

    I cant find +100 AND IM GETTING FUCKING PISSED HOW THE FUCK TO DO THIS!!!!!!!!!!
     
  3. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,719
    Resources:
    18
    Maps:
    1
    Spells:
    11
    Tutorials:
    6
    Resources:
    18
    [​IMG]

    why do people bump these old threads? -.- just create a thread at the world editor help zone..
     
  4. Davian_Thule

    Davian_Thule

    Joined:
    May 3, 2015
    Messages:
    15
    Resources:
    0
    Resources:
    0
    This is awesome! But how do we pick group units specifically? I mean I don't want it to heal Player 12 (Brown).
     
  5. gio1786

    gio1786

    Joined:
    Jun 8, 2016
    Messages:
    1
    Resources:
    0
    Resources:
    0
    guys after I am creating new trigger,I cant find an option: "Unit - A unit Starts the effect of an ability" of this, its normal or my editor is not working ? :))
     
  6. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,948
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    You should be able to find it if you create a new event, look for it in the event list thoroughly. You'll find it there.
     
  7. TheLordOfChaos201

    TheLordOfChaos201

    Joined:
    Jul 2, 2011
    Messages:
    1,732
    Resources:
    0
    Resources:
    0
    I thought those was going to show how to create enhanced spell triggers or pre-existing spells

    what your demonstrating here is only 1 spell, and, a spell that doesn't need trigs to run because you could use the item ruin heal which does the same thing.