1. Join other hivers in a friendly concept-art contest. The contestants have to create a genie coming out of its container. We wish you the best of luck!
    Dismiss Notice
  2. The Melee Mapping Contest #4: 2v2 - Results are out! Step by to congratulate the winners!
    Dismiss Notice
  3. We're hosting the 15th Mini-Mapping Contest with YouTuber Abelhawk! The contestants are to create a custom map that uses the hidden content within Warcraft 3 or is inspired by any of the many secrets within the game.
    Dismiss Notice
  4. The 20th iteration of the Terraining Contest is upon us! Join and create exquisite Water Structures for it.
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice

[Trigger] Omnipresent Third Party Trigger

Discussion in 'Triggers & Scripts' started by tulee, May 3, 2019.

  1. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    699
    Resources:
    5
    Maps:
    5
    Resources:
    5
    Hi guys. I have recently been playing around with how far I can go in my attempt to remove third party trigger data from maps in order to make them compatible with the latest Wc3 version. Sometimes I come across triggers, which while in GUI form the third party trigger data is missing, but when converted to custom script it appears at the bottom of the entire trigger, or even any single trigger line from within a full trigger.
    Below is a picture of an example trigger line I converted to custom script. The above part is a cinematic trigger line- fade out. But below the green line is the third party trigger data. The issue is, I cannot find it no matter when I look in GUI form, but if I convert any trigger, or even 1 line of a trigger into the custom script, it appears at the bottom of the green line. The custom trigger seems to be saving the trigger as the name of the trigger name itself, but I am not too interested in that right now (though later I suppose I would need to know how to replicate such a trigger in the standard world editor. More important is how I can actually find out where this custom trigger data is being added to the end of every line/trigger. Was wondering if anyone had any ideas.

    I have tried looking through the entire maps triggers, as well as the top of the map where code is normally written, and I have not been able to find anything so far.


    upload_2019-5-4_1-14-36.png
     
  2. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,104
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    • A function is a bundled piece of code.
    • A trigger is something that can have an event registered, and also actions. ( we ignore condtions here )
      • A trigger runs each time a registered event occurs
      • When a trigger runs it means all its actions are executed
    • A trigger action is only one specific form of a function.
    ... so .. when we set up any trigger and want some action to it, we need always at least 2 functions.
    1. in one function we create a trigger, register event and an action to it
    2. the other function must be the function that we need for our trigger actions
    In your sample code, the first function is the trigger action. It is basically what you see in the GUI actions, too.

    The second function, the InitTrig function, is created automatically in background from GUI, you don't see it. It will always create one trigger, register event, and action for it, to run. So this extra function, and trigger variable will always exist, also when you use GUI (in background).

    I'm not very sure though what you mean with you can't find it in GUI. What are you looking for exactly?
     
  3. tulee

    tulee

    Joined:
    Jul 26, 2008
    Messages:
    699
    Resources:
    5
    Maps:
    5
    Resources:
    5
    Eh, I think I realize my understanding of triggers/functions was incorrect. Thanks for taking time to teach me.