# HG changeset patch # User Wuzzy # Date 1523924206 -3600 # Node ID 41f5508fe01c553966cb30f644819f7662d31bb6 # Parent 3a0bedfe5c75cbebb0c2e856679e6864419bf89b LuaAPI: setgearcollisionmask exposure diff -r 3a0bedfe5c75 -r 41f5508fe01c LuaAPI.wiki --- a/LuaAPI.wiki Tue Apr 17 01:14:21 2018 +0100 +++ b/LuaAPI.wiki Tue Apr 17 01:16:46 2018 +0100 @@ -6,7 +6,7 @@ == Introduction == Version 0.9.13 of Hedgewars introduced the ability to use Lua scripts to modify Hedgewars behaviour for different maps without having to recompile the whole game. The till then used triggers (only appeared in training maps) were removed. - +f Lua is an easy to learn scripting language that’s implemented using open source libraries. If you’d like to learn more about Lua, have a look at [http://www.lua.org Lua's official homepage]. Even though its easy to learn syntax this wiki page won't explain all basics of using Lua, e.g. declaring variables or using control structures. There are tons of step-by-step tutorials and documentation available on the internet. Just throw “Lua” into your favourite search engine and give it a try. === About this wiki page === @@ -800,8 +800,9 @@ SetGearCollisionMask(gear, 0x0000) -- Collide with nothing -There are actual more flags availbable, but they are not as useful for use in Lua. You can find the full range of flags in the engine source code (in Pascal): -https://hg.hedgewars.org/hedgewars/file/default/hedgewars/uConsts.pas#l112 +There are actual more flags availbable, but they are not as useful for use in Lua and their constants have not been exposed to Lua. You can find the full range of flags in the engine source code (in Pascal): + +[https://hg.hedgewars.org/hedgewars/file/default/hedgewars/uConsts.pas#l112] === !SetGearVelocity(gearUid, dx, dy) === Gives the specified gear the velocity of `dx`, `dy`.