Knocksious
Sweet, I got 2 little green bars!
- Reaction score
- 46
oh nvm then
K I'm in.
So are you PMing us or posting, because PM would make my life easier
> K I'm in
Finally famous elmstfreddie will get to learn JASS.
If anyone prefers the lessons to be posted every 4 days or so, please say so, if I get lots of votes, then I would change the posting dates.
So, there is no doubt that JASS is the better then the program that is based upon it, GUI. Many members know that, however they don’t go on to learn JASS because they think they are not good enough with GUI or that JASS is too hard and not that good compared to GUI and all kind of nonsense. The problem is, if you like World Editor, it is a hobby that you spend time on; you need to learn JASS to get the best of it. Anyway what people say to themselves about JASS is usually wrong because they didn’t try it yet. More information about false myths about JASS can be found at the top part in this tutorial made by emj|r3.1. Few features that can be found using JASS are simply impossible to be done using GUI. Parts of them can be done, but you need to use advanced and complicated GUI. Those include special JASS actions, local variables, complete leak removal (there are leaks which you can’t remove when you use GUI, such as BoolExprs leaks, even when using custom script) and more.
2. JASS is cleaner. I know it seems like gibberish to you now, but pretty quickly you will find how easy it is to read JASS compared to GUI.
3. JASS if faster, you can do stuff in minutes were in GUI they could half an hour at least. Besides, it was tested, typing is faster the clicking.
4. JASS takes less memory space, in small maps it doesn’t matter that much, however in big massive maps it can changes the map’s size dramatically.
5. When knowing advance JASS (after many months of learning) you can actually create systems and new actions, yes, yes, I’m not lying. The best example would be KaTTaNa’s handle system. I won’t go into what it does, because simply it would do nothing but confuse you.
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
//===========================================================================
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing // Hi
endfunction
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing // I hope you are enjoying this class
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction // If not then I’ll make sure what happened to Kenny will happen to you too.
Untitled Trigger 001
Events
Time - Elapsed game time is 5.00 seconds
Conditions
(Number of units in (Units in (Playable map area))) Greater than 0
Actions
Player - Set Player 1 (Red) Current gold to 750
function Trig_Untitled_Trigger_001_Conditions takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(GetPlayableMapRect())) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
call SetPlayerStateBJ( Player(0), PLAYER_STATE_RESOURCE_GOLD, 750 )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Untitled_Trigger_001, 5 )
call TriggerAddCondition( gg_trg_Untitled_Trigger_001, Condition( function Trig_Untitled_Trigger_001_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
Well the first problem you will meet as a starting JASSer is not knowing commands. For example you won’t know how to do to make the order “move unit (instantly)” in JASS. Well the first way will make the command in GUI and then covert it to JASS (see “Trigger Conversion” chapter later in this lesson).
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
[b]call SetUnitPositionLoc( GetTriggerUnit(), GetRectCenter(GetPlayableMapRect()) )[/b]
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
function Trig_create_unit_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'hfoo' ) ) then
return false
endif
return true
endfunction
function Trig_create_unit_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'hfoo', Player(0), GetRectCenter(GetPlayableMapRect()), GetUnitLoc(GetDyingUnit()) )
endfunction
//===========================================================================
function InitTrig_create_unit takes nothing returns nothing
set gg_trg_create_unit = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_create_unit, Player(0), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_create_unit, Condition( function Trig_create_unit_Conditions ) )
call TriggerAddAction( gg_trg_create_unit, function Trig_create_unit_Actions )
endfunction