WolfieeifloW
WEHZ Helper
- Reaction score
- 372
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!
- 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!
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:
4. Using [noparse]
JASS:
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:
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":
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:
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]
Here's what it would look like when you're typing it out with the trigger from the pictures above:
And here's what it would look like when others read it:[noparse][/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)
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:
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:
Code:
Simply replace [noparse]
Code:
[/noparse][/b] with [b][noparse][wc3][/noparse][/b] and replace [b][noparse]
Here's what the above code would look like while typing it out when using [noparse]
Trigger:
And here's what it would look like when others read it:[noparse][/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 <gen> the event (Time - Every 1.00 seconds of game time)
- Trigger - Run Life Support Transfer <gen> (ignoring conditions)
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 <gen> the event (Time - Every 1.00 seconds of game time)
- Trigger - Run Life Support Transfer <gen> (ignoring conditions)
- Events
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:
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]
[/noparse]" to close the JASS tagJASS:" to open the JASS tag [*]Press "<b>CTRL + V</b>" to paste your code [*]Type in "<b>[noparse]</b>
And here's how it would look when you actually post it:[noparse][/noparse]JASS:function Trig_Life_Support_Start_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 039;A001039; ) ) 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
JASS:
function Trig_Life_Support_Start_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 039;A001039; ) ) 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!