Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Triggered Ability -- Stupify

Discussion in 'World Editor Help Zone' started by TheSonOfCulture, Oct 31, 2006.

  1. TheSonOfCulture

    TheSonOfCulture

    Joined:
    Oct 23, 2006
    Messages:
    65
    Resources:
    0
    Resources:
    0
    I can't see what is wrong with this, can you?

    Code (Text):
    Stupify
        Events
            Unit - A unit Begins casting an ability
        Conditions
            (Ability being cast) Equal to Stupify
        Actions
            Wait 0.50 seconds
            Set StupifyTarget = (Position of (Target unit of ability being cast))
            Special Effect - Create a special effect at StupifyTarget using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
            Special Effect - Create a special effect at StupifyTarget using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Level of Stupify  for (Casting unit)) Equal to 1
                Then - Actions
                    Hero - Modify Intelligence of (Targeted unit): Subtract 1
                Else - Actions
                    Hero - Modify Intelligence of (Targeted unit): Subtract (Random integer number between 1 and 2)
     
  2. VampireKB

    VampireKB

    Joined:
    Nov 27, 2004
    Messages:
    471
    Resources:
    7
    Maps:
    7
    Resources:
    7
    not targeted unit,but
    Target unit of ability being cast
     
  3. TheSonOfCulture

    TheSonOfCulture

    Joined:
    Oct 23, 2006
    Messages:
    65
    Resources:
    0
    Resources:
    0
    Thank you for the quick reply.
     
  4. Shamanruler

    Shamanruler

    Joined:
    Mar 29, 2004
    Messages:
    224
    Resources:
    1
    Maps:
    1
    Resources:
    1
    stupefy is the correct spelling and set your variable before the wait action
     
  5. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Also, the wait sux, the Begins Casting instead of Stats the Effect sux, the 2 leaking SFX sux, the leaking location sux, and the Casting Unit instead of Triggering Unit sux. fix those, and youll be good to go.
     
  6. TheSonOfCulture

    TheSonOfCulture

    Joined:
    Oct 23, 2006
    Messages:
    65
    Resources:
    0
    Resources:
    0
    This is why I need help, lol.

    Also, Stupify is an alternative spelling.
     
  7. low-life

    low-life

    Joined:
    Feb 10, 2006
    Messages:
    466
    Resources:
    1
    Icons:
    1
    Resources:
    1
    oh, i'll help you!

    1. Change trigger condition to more approciate
    2. Fix leaking SFX
    3. Fix location leak
    4. Change unit from Casting Unit to more approciate

    hope that helps (haha)
     
  8. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Well, first, get rid of that damn wait

    Second, change the event to

    A Unit Starts the Effect of an Ability

    Third, change the two lines where it mods the intelligence to

    Set int of TRIGGERING UNIT to x

    Fourth, at the end of the trigger saying

    Custom Script: call RemoveLocation( udg_StupifyTarget )

    Fifth, assign those two effects to variables or something, and destroy them using

    Destroy (effect)

    at the end of the trigger.
     
  9. TheSonOfCulture

    TheSonOfCulture

    Joined:
    Oct 23, 2006
    Messages:
    65
    Resources:
    0
    Resources:
    0
    Okay, I tried to make it better and make myself not look like an idiot.

    Code (Text):
    Stupify
        Events
            Unit - A unit Starts the effect of an ability
        Conditions
            (Ability being cast) Equal to Stupify
        Actions
            Set StupifyTarget = (Position of (Target unit of ability being cast))
            Special Effect - Create a special effect at StupifyTarget using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl
            Set StupifyEffect[1] = (Last created special effect)
            Special Effect - Create a special effect at StupifyTarget using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
            Set StupifyEffect[2] = (Last created special effect)
            Custom script:   call RemoveLocation( udg_StupifyTarget )
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (Level of Stupify  for (Triggering unit)) Equal to 1
                Then - Actions
                    Hero - Modify Intelligence of (Target unit of ability being cast): Subtract 1
                Else - Actions
                    Hero - Modify Intelligence of (Target unit of ability being cast): Subtract (Random integer number between 1 and 2)
            Wait 2.00 seconds
            For each (Integer A) from 1 to 2, do (Actions)
                Loop - Actions
                    Special Effect - Destroy StupifyEffect[(Integer A)]
     
     
  10. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Aye, you fixed it now :D