There was a bug in the original upload and I should have uploaded the fix here. Anyway the bug is fixed now. Also the code was updated to support CS2D's player's mouse x/y. You can get a player's mouse position like so:
1
2
2
pl.mousex pl.mousey
Thanks to @
Earthkin: for the detailed description of the bug and exactly how to fix it.This is my attempt to simplify CS2D's Lua API. It was inspired by
Livia's API mentioned here
The wrapper allows you to treat players like objects (similar to classes or structures) by using tables and metatables. It also overrides a few CS2D functions to make them easier to use, while maintaining compatibility with existing code.
I'm not going to give a lot of details here because I've already written a large readme, available on github and in the file archive.
The archive also includes samples which are also available on github. These are based on the samples in sys/lua/samples and include gungame.lua and utsfx.lua.
A snippet from gungame.lua
The wrapper will detect if
EngiN33R's
edited 4×, last 08.07.26 01:24:00 pm
Approved by SQ
Download
13 kb, 765 Downloads
Vehk's Lua Wrapper
4 like it!
Offline
1 