- Joined
- May 1, 2012
- Messages
- 95
The following software is an extension for Warcraft 3 which can let it execute lua script. You can just click 'launchwar3.bat' to lauch Warcraft 3 with this extension.
Call the following function in jass2 script
Now the imported 'hello.lua' is lauched.This function is the same as (require 'hello.lua') in lua.
Here is a simple example
For more information please check the attachment 'example.w3x' and Introduction
You can find more lua engine related source code here.GitHub
In addition, you can use jass2lua tool to translate your jass base map to a lua base map.jass2lua
Call the following function in jass2 script
JASS:
call Cheat("exec-lua: hello.lua")
Here is a simple example
Code:
-- jass.common is a library, it contains all the function in common.j
local cj = require 'jass.common'
cj.TimerStart(cj.CreateTimer(), 1.00, true,
function ()
cj.DisplayTimedTextToPlayer(cj.GetLocalPlayer(), 0, 0, 60., 'hello')
end
)
You can find more lua engine related source code here.GitHub
In addition, you can use jass2lua tool to translate your jass base map to a lua base map.jass2lua
Attachments
Last edited: