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. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  4. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    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.

Create special effect at dead unit

Discussion in 'World Editor Help Zone' started by Kabel, Jul 28, 2009.

  1. Kabel

    Kabel

    Joined:
    Nov 5, 2008
    Messages:
    535
    Resources:
    0
    Resources:
    0
    Hi!

    Skeletons can be built in map by all players. There can be a lot of them.

    When a skeleton dies, is it possible to add a special effect at the location of the dead skeleton? The special effect shall last until the skeleton decays, thats around 80 seconds.

    Here comes the tricky part:
    If the skeleton is ressurected, can the special effect that is on the dead skeleton be removed as the skeleton gets backs to life?


    To sum things up:
    The special effect shall have the same function as a corpse, to show where the dead skeleton is located.



    Is this to complicated to make? If yes, what can I do instead to get the same or a similar effect?
     
  2. Tiucaner

    Tiucaner

    Joined:
    Aug 9, 2005
    Messages:
    76
    Resources:
    1
    Maps:
    1
    Resources:
    1
    • Untitled Trigger 001
      • Events
        • Unit - A unit Dies
      • Conditions
        • (Unit-type of (Dying unit)) Equal to (your Skeleton)
      • Actions
        • Special Effect - Create a special effect attached to the overhead of (Dying unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
     
  3. DoctaRoxka

    DoctaRoxka

    Joined:
    Jul 29, 2009
    Messages:
    12
    Resources:
    0
    Resources:
    0
    • Skeleton Dies
      • Events
        • Unit - A unit Dies
      • Conditions
        • (Unit-type of (Dying unit)) Equal to (your Skeleton)
      • Actions
        • Special Effect - Create a special effect attached to the overhead of (Dying unit) using Your Special Effect.


    When the corpse decays just destroy the special effect.
     
  4. Kabel

    Kabel

    Joined:
    Nov 5, 2008
    Messages:
    535
    Resources:
    0
    Resources:
    0
    But how do I destroy the effect when the corpse is raised?
     
  5. ALiEN95

    ALiEN95

    Joined:
    Mar 4, 2009
    Messages:
    1,148
    Resources:
    1
    Spells:
    1
    Resources:
    1
    special effect -create your special effect
    special effect -destroy (last created special effect)

    you cant destroy it when decay (you can but very hardly) and you don't need to

    if you ill ever need to destroy effect after <x> seconds/after decay


    create unit that has model file of your effect and add him Locust ability (on that way it cannot be selected d and it has no pathing map)
    create (your unit that uses model file of your special effect)
    add countdown timer of <x> seconds for last created unit
     
  6. Ham Ham

    Ham Ham

    Joined:
    Oct 2, 2006
    Messages:
    1,159
    Resources:
    12
    Models:
    9
    Maps:
    3
    Resources:
    12
    Wrong. That would destroy the LAST special effect, what means, if you create any other SE after that one, only the last created one will be destroyed.


    You should make an ability based on Claws of Attack or Ring of Defense. Set the attack/defense increae to 0, and add the model and attachment points for it. REname it as "Special Effect Ability"


    Then, if a Skeleton Dies, use the give ability trigger to give him the "Special Effect Ability"

    When he gets resurrected, use the remove ability trigger to remove him the "Special Effect Abiliity"
     
  7. ALiEN95

    ALiEN95

    Joined:
    Mar 4, 2009
    Messages:
    1,148
    Resources:
    1
    Spells:
    1
    Resources:
    1
    ......
    firstly
    "That would destroy the LAST special effect, what means, if you create any other SE after that one, only the last created one will be destroyed." is wrong

    you can always destroy every special effect

    secondly

    how can you make added ability work on dead unit ?
     
  8. Ham Ham

    Ham Ham

    Joined:
    Oct 2, 2006
    Messages:
    1,159
    Resources:
    12
    Models:
    9
    Maps:
    3
    Resources:
    12
    First:
    Yes, but you should set the SE a variable if you want to destroy later.


    Second:
    It works because its passive.
     
  9. ALiEN95

    ALiEN95

    Joined:
    Mar 4, 2009
    Messages:
    1,148
    Resources:
    1
    Spells:
    1
    Resources:
    1
    first xD
    i think its better to create a unit with countdown timer <x> seconds

    add locus ability
    set his model file to model file of you special effect
     
  10. Ham Ham

    Ham Ham

    Joined:
    Oct 2, 2006
    Messages:
    1,159
    Resources:
    12
    Models:
    9
    Maps:
    3
    Resources:
    12
    What if the corpse gets canibalized, raised, or loaded into a meat wagon? How to detect if it happens and remove the unit?
     
  11. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,761
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Destroying it instantly after it's created will work and prevent the leak.

    The time between the creation/destruction executions is so minimal, that it's probably impossible for another effect from another trigger to be created in-between that time.

    And thats only if triggers are ran simultaniously, which I do not know how they are executed.
     
  12. Ham Ham

    Ham Ham

    Joined:
    Oct 2, 2006
    Messages:
    1,159
    Resources:
    12
    Models:
    9
    Maps:
    3
    Resources:
    12
    But he dont wants the effect gets removed. It must last until it decays, and as far I know, adding abilities wont generate leak.
     
  13. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,761
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    If he knows how long it will take for the unit to decay he could use my TimedHandles script. It would require a custom script though.

    Custom Script: call DestroyEffectTimed(bj_lastCreatedEffect, decaytime)

    Or he could run a timer periodically checking if the unit exists or not.

    If the unit doesn't exist, destroy the effect.
     
  14. ALiEN95

    ALiEN95

    Joined:
    Mar 4, 2009
    Messages:
    1,148
    Resources:
    1
    Spells:
    1
    Resources:
    1
    you can remove (special effect unit) when he dies

    OR

    set death type -cant raise and does not decay

    i think unit with locust cannot be loaded