How many different gears are there?
Wed, 2010-11-03 23:23
So I got myself lua, started looking at Smaxx's unfinished Hedgewars Lua API documentation and some of the scripts from the training missions.
My questions are: How many gears are there in .13?
And .14?
What are their names?
I assume that barrels and mines are also gears? I read somewhere that .13 doesn't have case (crate) gears. For now that's a pity, but I look forward to it in the next version!
Is there a list somewhere of the public/global variables and functions like FindPlace, GetGearType, SetGearPosition etc?
Thanks in advance!
mikade
Hedgewars Developer
update: Spent about 5 hours playing around in Lua. I have a much better idea as to what's going on, now and have achieved some pretty interesting results. With a properly working "Using a Weapon Doesn't End Your Turn" mode I reckon I could make some pretttty cool missions. I'm tempted to try update my windows version to experimental .14 but I don't know how. :S
Maybe I'll just wait and work on what I've got so far.
Think I've worked out (most / a lot) of the gears, too.
Between Cairo and I we seem to have worked out every weapon code except for that darned Hellish Hand-grenade!
Is there a variable I can change to control wind speed / direction?
edit: I'm told not in .13. Maybe in the future release? Would allow for some awesome missions.
mikade
Hedgewars Developer
Actually you can change wind speed by adding the gear gtATSmoothWindCh and setting the tag like this:
this is max speed towards right, left is negative and 0 is no wind
note: wind will still change every turn
you can write it in a single line to if you want to:
same goes for water rise:
where the tag must be higher then 0
maybe there will be a nicer solution next release, but that isn't really needed, hope this helps
by the way: http://code.google.com/p/hedgewars/wiki/LuaAPI
One of those hedgewars developers. I am specially knowledgeable in lua scripting, and the father of gameplay scripts.
Brilliant work! (And nice work with the water, too). Thanks for the post. I wish I had had that API two weeks ago when I still knew nothing. But sitting there for hours puzzling things out was an interesting learning experience, I guess :P
Now I just need 0.9.14 and I can start making things happen
mikade
Hedgewars Developer