Tutorial How To Post Your Trigger

Status
Not open for further replies.

WolfieeifloW

WEHZ Helper
Reaction score
372
How To Post Your Trigger!
Written By: Wolfie[NoCT]


I decided to make this a snippet instead of a tutorial because it's just a short thing.
I made this because I have seen multiple users either:
  • Type out there code by hand; Which wastes a lot of their time by typing it and ours by having to read through it!
OR
  • Get flamed for not using code tags; Which makes them feel this is a bad environment, which isn't what we want; TH.net is a good place!
Suggestions/constructive criticism are welcome, flaming is not.
Feel free to rate the thread also!
Flaming will most likely result in -rep from me, and others.


How To Post Your Trigger

Ever wonder how all those TH.net veterans post there triggers on the forums?
Hate getting those snarky comments from people telling you to post your trigger inside of a "code" tag, but don't know what that is / how to do it?
Then you've started reading the right thing!
This little snippet will show you how to post your trigger into your thread on these forums!



Contents

1. How to copy your trigger.
2. How to paste your trigger.
3. Using [noparse]
Trigger:
[/noparse] tags.

4. Using [noparse]
JASS:
[/noparse] tags.





1. How to copy your trigger.

The first step to get your trigger onto the forums is copying it.
Inside the Trigger Editor on World Editor, select the trigger you want copied from the left-hand list:

selecttriggercb9.jpg


Now, where your code is, see where it says "Events"?
Notice above that how it says your triggers name ["Life Evade Start" in the picture] ?
Right click on the trigger name.
Now from the list, select "Copy As Text":

copyastextqx1.jpg


Your trigger is now copied and ready to be pasted onto the forums!



2. How to paste your trigger.

Now, to put your copied trigger into your post you need to use [noparse]
Code:
[/noparse]
tags.
Wherever you want your code to start, place the [noparse]
Code:
[/noparse][/b] tag.
After you type in that, press "[b]CTRL + V[/b]" to paste your trigger.
When your trigger is pasted, type in [b][noparse]
[/noparse]
.
Here's what it would look like when you're typing it out with the trigger from the pictures above:
[noparse]
Code:
Life Support Start
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to (==) Life Support 
    Actions
        Trigger - Add to Life Support Transfer <gen> the event (Time - Every 1.00 seconds of game time)
        Trigger - Run Life Support Transfer <gen> (ignoring conditions)
[/noparse]
And here's what it would look like when others read it:
Code:
Life Support Start
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to (==) Life Support 
    Actions
        Trigger - Add to Life Support Transfer <gen> the event (Time - Every 1.00 seconds of game time)
        Trigger - Run Life Support Transfer <gen> (ignoring conditions)



3. Using [noparse]
Trigger:
[/noparse] tags.


These tags can come in handy, sometimes.
[del]However, some users do not like this tag at all, and sometimes may not read your code to help you;
But for the most part, this tag is accepted.[/del]
To use the [noparse]
Trigger:
[/noparse]
tag is the same as using the [noparse]
Code:
[/noparse]
tag.
Simply replace [noparse]
Code:
[/noparse][/b] with [b][noparse][wc3][/noparse][/b] and replace [b][noparse]
[/noparse]
with [noparse][/wc3][/noparse].
Here's what the above code would look like while typing it out when using [noparse]
Trigger:
[/noparse]
tags:
[noparse]
Trigger:
  • Life Support Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Life Support
    • Actions
      • Trigger - Add to Life Support Transfer &lt;gen&gt; the event (Time - Every 1.00 seconds of game time)
      • Trigger - Run Life Support Transfer &lt;gen&gt; (ignoring conditions)
[/noparse]
And here's what it would look like when others read it:
Trigger:
  • Life Support Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Life Support
    • Actions
      • Trigger - Add to Life Support Transfer &lt;gen&gt; the event (Time - Every 1.00 seconds of game time)
      • Trigger - Run Life Support Transfer &lt;gen&gt; (ignoring conditions)

NOTE: As said by Darthfett, if you don't copy your trigger exactly from WE, and accidentally type something extra in / leave something out, this tag will make it look horrible;
So use these tags with care.



4. Using [noparse]
JASS:
[/noparse] tags.


If you are trying to post a JASS trigger, highlight all of your JASS text, press "CTRL + C" to copy your code, then do the following:
  • Type in "[noparse]
    JASS:
    [/noparse]
    JASS:
    &quot; to open the JASS tag
    [*]Press &quot;<b>CTRL + V</b>&quot; to paste your code
    [*]Type in &quot;<b>[noparse]</b>
    [/noparse]" to close the JASS tag
Here's how it would look when you're typing it, with the above trigger (In JASS form, obviously):
[noparse]
JASS:
function Trig_Life_Support_Start_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == &#039;A001&#039; ) ) then
        return false
    endif
    return true
endfunction

function Trig_Life_Support_Start_Actions takes nothing returns nothing
    call TriggerRegisterTimerEventPeriodic( gg_trg_Life_Support_Transfer, 1.00 )
    call TriggerExecute( gg_trg_Life_Support_Transfer )
endfunction

//===========================================================================
function InitTrig_Life_Support_Start takes nothing returns nothing
    set gg_trg_Life_Support_Start = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Life_Support_Start, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Life_Support_Start, Condition( function Trig_Life_Support_Start_Conditions ) )
    call TriggerAddAction( gg_trg_Life_Support_Start, function Trig_Life_Support_Start_Actions )
endfunction
[/noparse]
And here's how it would look when you actually post it:
JASS:
function Trig_Life_Support_Start_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == &#039;A001&#039; ) ) then
        return false
    endif
    return true
endfunction

function Trig_Life_Support_Start_Actions takes nothing returns nothing
    call TriggerRegisterTimerEventPeriodic( gg_trg_Life_Support_Transfer, 1.00 )
    call TriggerExecute( gg_trg_Life_Support_Transfer )
endfunction

//===========================================================================
function InitTrig_Life_Support_Start takes nothing returns nothing
    set gg_trg_Life_Support_Start = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Life_Support_Start, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Life_Support_Start, Condition( function Trig_Life_Support_Start_Conditions ) )
    call TriggerAddAction( gg_trg_Life_Support_Start, function Trig_Life_Support_Start_Actions )
endfunction



--------------------------------------------------

Congratulations;
You now know how to post your triggers onto the forums!
Thanks for reading.
Again;
Suggestions/constructive criticism are welcome, flaming is not.
Feel free to rate the thread also!
 

12sea21

New Member
Reaction score
5
nice tut! +rep... (you shouldve done it like 2 weeks ago.. lol! :D
Maybe you can do other triggers as well!
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Add onto the
Trigger:
  • tag part that if it&#039;s not exact, or nearly exact code directly from the trigger editor, they usually don&#039;t look better than the code tags. I can&#039;t stand it when people wrap terribly looking code with them.
    • This is a good post to refer to, thanks. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
 

vypur85

Hibernate
Reaction score
803
I hope this is stickied in the WEHZ. :)

> 3. Using [noparse]
Trigger:
[/noparse] tags.

Damn... I hate this tag. [noparse]
Code:
[/noparse] is a better one.


Good 'snippet' by the way :).
 

CaptDeath

New Member
Reaction score
103
why is this graveyard ed lol?
another tut to reduce the extreme nuubiyness of some
 

12sea21

New Member
Reaction score
5
i asked my friend a few days ago "How do you use tags?" cos in my other web we use it differently, so im like [trigger]blah[/trigger] DOESNT WORK?!?!?! :D
 

WolfieeifloW

WEHZ Helper
Reaction score
372
nice tut! +rep... (you shouldve done it like 2 weeks ago.. lol! :D
Maybe you can do other triggers as well!
Glad you liked it!
What do you mean by "other triggers" though?

Add onto the
Trigger:
  • tag part that if it&#039;s not exact, or nearly exact code directly from the trigger editor, they usually don&#039;t look better than the code tags. I can&#039;t stand it when people wrap terribly looking code with them.
    • This is a good post to refer to, thanks. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
Trigger:
  • I&#039;ll add that in right now;
    • Thanks for the feedback!
    • <blockquote data-attributes="" data-quote="vypur85" data-source="post: 897345"
      • class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch">
        • <div class="bbCodeBlock-title">
          • <a href="/goto/post?id=897345"
            • class="bbCodeBlock-sourceJump"
            • rel="nofollow"
            • data-xf-click="attribution"
            • data-content-selector="#post-897345">vypur85 said:</a>
        • </div>
      • <div class="bbCodeBlock-content">
        • <div class="bbCodeBlock-expandContent js-expandContent ">
          • I hope this is stickied in the WEHZ. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
    • &gt; 3. Using [noparse]<div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_10">
    • </ul>
    • </div></div>[/noparse] tags.
    • Damn... I hate this tag. [noparse]
    • <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code">
      • <div class="bbCodeBlock-title">
        • Code:
      • </div>
      • <div class="bbCodeBlock-content" dir="ltr">
        • <pre class="bbCodeCode" dir="ltr" data-xf-init="code-block" data-lang=""><code></code></pre>
      • </div>
    • </div>[/noparse] is a better one.
    • Good &#039;snippet&#039; by the way <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />.
      • </div>
      • <div class="bbCodeBlock-expandLink js-expandLink"><a role="button" tabindex="0">Click to expand...</a></div>
      • </div>
    • </blockquote>I would&#039;ve thought this would get something besides <b>Graveyard</b> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite5" alt=":confused:" title="Confused :confused:" loading="lazy" data-shortname=":confused:" /> .
    • Glad you liked it also!
    • <blockquote data-attributes="" data-quote="CaptDeath" data-source="post: 897346"
      • class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch">
        • <div class="bbCodeBlock-title">
          • <a href="/goto/post?id=897346"
            • class="bbCodeBlock-sourceJump"
            • rel="nofollow"
            • data-xf-click="attribution"
            • data-content-selector="#post-897346">CaptDeath said:</a>
        • </div>
      • <div class="bbCodeBlock-content">
        • <div class="bbCodeBlock-expandContent js-expandContent ">
          • why is this graveyard ed lol?
    • another tut to reduce the extreme nuubiyness of some
      • </div>
      • <div class="bbCodeBlock-expandLink js-expandLink"><a role="button" tabindex="0">Click to expand...</a></div>
      • </div>
    • </blockquote>I&#039;ve PM&#039;d a moderator asking why this was graveyarded right now.
    • My goal isn&#039;t to &quot;reduce noobness&quot;;
    • It&#039;s to help the <b>new</b>bies transition into our forums.
    • <blockquote data-attributes="" data-quote="12sea21" data-source="post: 897347"
      • class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch">
        • <div class="bbCodeBlock-title">
          • <a href="/goto/post?id=897347"
            • class="bbCodeBlock-sourceJump"
            • rel="nofollow"
            • data-xf-click="attribution"
            • data-content-selector="#post-897347">12sea21 said:</a>
        • </div>
      • <div class="bbCodeBlock-content">
        • <div class="bbCodeBlock-expandContent js-expandContent ">
          • i asked my friend a few days ago &quot;How do you use tags?&quot; cos in my other web we use it differently, so im like [trigger]blah[/trigger] DOESNT WORK?!?!?! <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />
        • </div>
        • <div class="bbCodeBlock-expandLink js-expandLink"><a role="button" tabindex="0">Click to expand...</a></div>
      • </div>
    • </blockquote><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" /> .
    • Shoulda waited a couple days, read this, then you wouldn&#039;t have had to ask <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /> .
    • EDIT: Quote [a cutdown version] from Flare as to why this is graveyarded.
    • <blockquote data-attributes="" data-quote="Flare" data-source=""
      • class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch">
        • <div class="bbCodeBlock-title">
          • Flare said:
        • </div>
      • <div class="bbCodeBlock-content">
        • <div class="bbCodeBlock-expandContent js-expandContent ">
          • Secondly, it&#039;s just re-stated what&#039;s been said in the rules
    • <blockquote data-attributes="" data-quote="" data-source=""
      • class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch">
      • <div class="bbCodeBlock-content">
        • <div class="bbCodeBlock-expandContent js-expandContent ">
          • Use WC3 Tags. Don&#039;t know how? When you have a trigger, look at the Events icon in the trigger editor. See the name of the trigger right above it? Right-click. Select Copy As Text, then paste into your thread. Put the <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_11">
    • <li class="lasttree"><span class="default">tag at the beginning of the trigger, and put the</span></li>
    • </ul>
    • </div></div> tag at the end. If you are posting in the JASS Zone, there are similar tags for JASS. They work like this: <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">JASS:</div><div class="bbCodeBlock-content"><pre class="bbCodeCode"><code class="jass"></code></pre></div></div>.
      • </div>
      • <div class="bbCodeBlock-expandLink js-expandLink"><a role="button" tabindex="0">Click to expand...</a></div>
      • </div>
    • </blockquote>Your tutorial is just stretching something simple, to the point where it&#039;s only classifiable as a tutorial due to the fact that it&#039;s reasonably long. Anyway, it might help a few people, but new members will be new members, and probably won&#039;t even look at the tutorial (unless it has glitter and sparkles trailing off it <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />)
      • </div>
      • <div class="bbCodeBlock-expandLink js-expandLink"><a role="button" tabindex="0">Click to expand...</a></div>
      • </div>
    • </blockquote>
 

CaptDeath

New Member
Reaction score
103
mui is [multi unit instance ability]
as in more then one unit can cast it at a given monment
 

WolfieeifloW

WEHZ Helper
Reaction score
372
i meant maybe you can do other trigger tags... (jass, MUI (what is MUI?), vJass etc.)
Oh, well actually, only one of those is an actual tag, [noparse]
JASS:
[/noparse]
.
I'll add that in though right away.

EDIT: Added a JASS section, +rep to you.
 

Leazy

You can change this now in User CP.
Reaction score
50
lol, how can this be graveyarded? It's really useful to some, +rep :)
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Read the bottom of this post for a PM from Flare telling me why it was probably Graveyarded.
Personally, I think this tutorial should be ungraveyarded or a link added to the "Rules" post in the WEHZ.
 

Builder Bob

Live free or don't
Reaction score
249
I made this because I have seen multiple users either:
(---)
OR
  • Get flamed for not using code tags; Which makes them feel this is a bad environment, which isn't what we want; TH.net is a good place!

Even though this is graveyarded, I see why you would want to make a tutorial for new posters on this forum. It's a nice thing to do. However, most new posters won't read tutorials about how to post triggers when they stumble upon this place, most likely to get help on said triggers.

In my opinion, the problem isn't the new posters though. As you've pointed out, it's the flamers. If there are anyone who can help this issue, it's us who use this forum already. Having said that, I think TH.net is a very friendly place compared to the Internet's standards already, so I'd say TH.net is on a good path.

Edit: The first time I posted on TH.net, I came to ask for help on some very basic trigger stuff, and was to my surprise met with willingness to help instead of a the usual flaming I was so used to when asking stupid questions on the net. Even when I didn't understand the answers I got, people continued to help. This is the reason I stayed.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I definitely agree with pretty much everything you said.
I, personally, don't "flame" users when they don't post in a code tag.
I kindly ask them to post their code in code tags, and tell them how to do it.

I know newbies won't read tutorials without being told to;
But that's why I made this.
Instead of explaining in said thread, just link them to this tutorial and tell them to read it.
Most of the time, they will and then after reading this will remember how to post their triggers;
And if they don't they can just refer back to this and look up what part they forgot;
Thanks to my handy table of contents ;) !

EDIT: I also agree TH.net is friendly.
To be honest, it's the best forum I've ever been a part of.
 

Builder Bob

Live free or don't
Reaction score
249
I know newbies won't read tutorials without being told to;
But that's why I made this.
Instead of explaining in said thread, just link them to this tutorial and tell them to read it.
Ah, that would actually be helpful. After having told the same thing a hundred times, it can become tedious.

EDIT: I also agree TH.net is friendly.
To be honest, it's the best forum I've ever been a part of.

Same here.
 

vypur85

Hibernate
Reaction score
803
Anyway, I still think no one (directed to newbies) will read this. They don't even take the time to read 'How not to write a thread title'.

Also, to add up a little bit about the 'flame' thing. Sometimes, when there're newby posting some weird/incomplete questions, I noticed that some people would just post a link to 'How not to write a thread title' or 'Rules'. And that's it, no questions answered. Just a link there with a few unrelated comments. This seems quite sarcastic to me =.=. It's ok to post the link... but at least take some time to answer the adressed question. I'm sure the question is answerable. Example:

Question:
Title: Help...

Why not working?

Event
A unit starts the effect of an ability
Condition
Ability being cast Equal to Something
Actions
Unit - Create 1 dummy...
Unit - Add Storm Bolt to (Last created unit)
Unit - Order (Last created unit) to Storm Bolt...
Unit - Remove (Last created unit)

Replies:
  1. pls use
    Code:
     tags...
    [*]Read [URL="http://www.thehelper.net/forums/showthread.php?t=66660"]this[/URL].
    [*]code tag pls...
    [*][url]http://www.thehelper.net/forums/showthread.php?t=101956[/url]
    [/list]
    
    =.= All I want to say is, at least answer the damn question along the lines....
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I do (not saying you directed your post at me) post my answers to the people's questions if I post one of those links.
Also though, I bet the next time the user makes a post, he won't call it "help" or something of the like if he gets linked to the "How not to write a thread title" page.
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top