EDIT:
There are other options to use besides pure Lua. Here's a link to C# and TypeScript.
These all compile to Lua so you're still required to use Lua as the supported language in your map:
A set of systems to simplify the process of programming maps for WarCraft 3 in C#. - Orden4/WCSharp
github.com
Hello there ! I am trying to use @TriggerHappy 's TypeScript template for wc3. First let me tell you that I am a complete newbie at TS, although I have already used JavaScript a while back. So like any well-behaved newbie, I have followed the quick startup guide found at...
www.hiveworkshop.com
HOW TO GET STARTED USING LUA:
Lua VSCode Integration <--- Follow the instructions in this
Then setup your map to be compatible with Lua (picture 1).
Then create a custom script in the trigger editor and paste your Lua code in it (picture 2).
You'll have to disable any existing triggers that use Custom Script before converting to Lua. This is because that Custom Script was using Jass and as of now Lua cannot be used with Jass/vJass.
You'll also have to update that Custom Script to follow Lua's syntax rules. Some examples, Lua doesn't require you to type "call" or "set" and I believe you don't have to null local variables (look into the Garbage Collector, you probably still want to null some things and clean up leaks). "null" also becomes "nil". "endif" becomes "end". NOT EQUAL TO changes from 5 != 10 to 5 ~= 10. These are just a few examples, you can get a much better understanding of this if you read through the Lua manual:
Functions no longer use "takes nothing returns nothing" and instead look like this:
Lua:
function HelloWorldTest()
print("Hello World")
end
function CreateAUnit()
local newUnit = CreateUnit(Player(0), FourCC("hfoo"), 0, 0, 270)
DisplayUnitName(newUnit)
end
--Comments use this double hyphen instead of double slash //
--If you wanted to pass some data in the parameters you would do it like so:
function DisplayUnitName(unit)
local stringExample = GetUnitName(unit)
print(stringExample)
end
Also, rawcodes in Lua require the FourCC() prefix:
Lua:
FourCC("hfoo")
FourCC("A000")
If memory serves me right then apostrophes in the rawcode DON'T work either -> 'hfoo'
This link has some important information in it. I find some of the comments in there (see Eikonium's post) very resourceful when it comes to structure, formatting, desyncs, what to avoid doing, etc:
Lua Submission Rules Discussion
This
MIGHT be a workaround to the compatibility restrictions, I haven't tried it:
JNGP Lua Edition - Combining JASS/vJass/Lua