1. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. 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.

Quick Tutorial - Common Triggering Tips

Discussion in 'Trigger (GUI) Editor Tutorials' started by Bribe, Mar 1, 2011.

  1. Losam

    Losam

    Joined:
    Mar 27, 2011
    Messages:
    258
    Resources:
    8
    Spells:
    8
    Resources:
    8
    Dear Bribe, I have a question for you: On the way to remove that lightning is not correct (my World Edit Trigger blocks that has this script) you can explain?
     
  2. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,429
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Thank you for pointing that out. I have fixed it in the main post:
    • Set LightningVar = (Last created Lightning Effect)
    • Custom script: call DestroyLightning(udg_LightningVar)


    It should be DestroyLightning() instead of RemoveLightning(), as shown above. (RemoveLightning() does not exist)
     
  3. xn85d.2

    xn85d.2

    Joined:
    Dec 7, 2012
    Messages:
    16
    Resources:
    0
    Resources:
    0
    • Lightning - Destroy (Last created lightning effect)


    exists as a GUI function, why do you need to JASS it?

    Also, I found that (Triggering Player) does not correctly replace (Owner of Unit(Entering Unit)) for
    • Unit - A unit enters Region
     
  4. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,429
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Ah, I don't have the editor on this computer so I didn't know that. I will update it later. :)

    Also, for (Triggering Player), it only works for PlayerUnitEvent/PlayerEvent (when converted to JASS) events. The region event isn't. But thanks for that, I see that the main post's statement was a bit broad so I will try to find time to update it for which GUI ones work and which ones don't.