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. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. 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.

Need help with custom ability

Discussion in 'Triggers & Scripts' started by MatiS, May 12, 2015.

  1. MatiS

    MatiS

    Joined:
    Feb 23, 2015
    Messages:
    208
    Resources:
    29
    Models:
    27
    Packs:
    2
    Resources:
    29
    I've made an ability for my map, but it only consumes mana. It should leave armor-increasing aura in caster's location and if used again, it should destroy the aura and teleport caster there. I checked triggers and didn't find anything. View attachment spell.w3x

    I would be grateful for help.
     
  2. Nichilus

    Nichilus

    Joined:
    Sep 26, 2009
    Messages:
    1,968
    Resources:
    0
    Resources:
    0
  3. Varimathras.

    Varimathras.

    Joined:
    Jul 9, 2007
    Messages:
    48
    Resources:
    1
    Maps:
    1
    Resources:
    1
    i found the problem:
    you have to disable the release trigger on map init
    if u add a debugging message in every trigger to see when they run you will notice that the cast and release trigger always fire together, so the spell ends immediately
    also you need a delay after casting before you enable the other trigger, just add Wait 0.25 seconds between turning off the one and turning on the other trigger and give your ability a cooldown of 1sec or anything that you cant cast it too early when no trigger is enabled

    some side notes:
    - you should stop the timer when the release trigger runs
    - when i load the map the dummy doesnt have the aura, instead he has the ability unknown (A00R)
    - also in the cast trigger it says "Create 1 _ for (Owner of ...." i put the dummy in there
    - you should use the even "Unit starts the effect of an ability" instead of "Unit starts casting an ability", else you can produce bugs
    - you are leaking a location, use the following custom script at the end of your triggers "ShelterRelease" and "ShelterTimer":
    call RemoveLocation(udg_CasterPosition)
     
  4. MatiS

    MatiS

    Joined:
    Feb 23, 2015
    Messages:
    208
    Resources:
    29
    Models:
    27
    Packs:
    2
    Resources:
    29
    Problem is that I don't have English version of world editor, and that's why I didn't added triggers. I'm gonna download English version because translating triggers names is pain in the neck.

    Thanks for help