call CreateUnit (Player(0), 'hfoo', x, y, 270)
Source: http://www.hiveworkshop.com/forums/...als-280/beginning-jass-tutorial-series-30765/What is JASS?
-JASS is the programming language used by the Wc3 engine.
What is GUI?
-GUI stands for Graphic User Interface. It is the default crap used by the trigger editor, made to make triggering easier. Unfortunatly, Blizzard made it harder. GUI is bad. It uses BJ's (which will be covered later on), inneficient code, and is overall messy and limiting.
Why use JASS? Can't I just use GUI?
-Sure, you can use GUI. It's not recomended anymore, but it's not dead or nothing.
Here are the Pros of JASS:
-Easier to write out
-Faster, more effecient, and no leaks (when done properly that is)
-Breaks many restraints created by GUI
-Doesn't use BJ's (which again is possible when done correctly)
-Neater, easier on the eyes for longer triggers
-Easier to copy/paste, and can be edited in a text editor or 3rd-party editors (such as JASScraft)
-Generally faster to do when you get the hang of it. Much less clicking around.
However, you must be careful with JASS. As great as it is, it must be used correctly. One single mis-type can screw up an entire trigger.
JASS:function Agree takes string statement returns boolean if statement == "GUI never was and never will be the future of modding Warcraft. ;) " then return true endif return false endfunction
function THE_END takes string playersaid returns nothing
if Agree(playersaid) == false then
call CloseWarcraftIII()
call DestroyComputer()
endif
endfunction
The only thing that I hate in Jass and vJass is that they are painful to the eyes not like GUI, colorful function icons which makes your eye to relax...
Aside from that, Jass is better than GUI because GUI lacks some functions.
Not to mention with TESH/Horus you can change the styles of your syntax highlights. Just look at how awesome my code looks with a dark background![]()
Aside from that, Jass is better than GUI because GUI lacks some functions.
-
- Easier for beginners to learn and shows them what they have to work with and there basic initial limitations with the wc3 engine.
- Wont screw over your whole game like it did with me in a few of them when blizzard came out with patch 1.24 and i had to re-due a lot of shit.. :/ (when i re-did it i just did it in gui this time so that never happens again, took a little longer to do though probably, but works just as well)
- I Don't love typing a ton or enjoy reading a lot but i can skim through GUI quite quickly without even looking at its code sometimes, just finding the gui icon im looking for then looking at a few lines can be faster sometimes.
function Create_Img takes string file, real SizeX, real SizeY, real PosX, real PosY, real PosZ, boolean Show returns image
local image i = CreateImage(file, SizeX, SizeY, 0, PosX, PosY, PosZ, 0, 0, 0, 2)
call SetImageRenderAlways(i, true)
call ShowImage(i, Show)
return i
endfunction
function Img_Call takes nothing returns nothing
call Create_Img("smiley.blp", 64, 64, 0, 0, 0, true)
endfunction