English Vehk's Lua Wrapper icon

5 comments
10.12.17 11:05:07 pm
like 3 like it!
13 kb, 28 Downloads
Vehk
User
Offline Off
I will not be updating the file on the archive often! Most updates will be done on the github repo. Get the latest updates there!


This is my attempt to simplify CS2D's Lua API. It was inspired by user Livia's API mentioned here thread cs2d Extending native functions, but that project appears to be dead.

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
More >


The wrapper will detect if user EngiN33R's file cs2d [EngiN33R] UTF-8 Wrapper Library (11) is loaded and update the colorcode symbol (©) accordingly. A function is provided to get the correct color code or create a color string given RGB, C (see section 4 of the readme).
edited 2×, last 16.12.17 11:44:31 pm
ok This file has been reviewed and approved by SQ (10.12.17 11:38:15 pm)

Comments

5 comments
Goto Page
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in
15.03.18 01:50:21 am
Up
Vehk
User
Offline Off
There was a bug in players.lua that caused some CS2D player values to not be accessible (read or write) with the wrapper. It has been fixed, available on github. Or you can simply copy the changes from here (only two different lines): commit page.

I've also made a few minor additions to the wrapper that are not available from this file, get the latest from github!
11.12.17 07:22:08 pm
like I like it!
Up
Infinite Rain
Reviewer
Offline Off
Awesome.
11.12.17 09:40:19 am
like I like it!
Up
Masea
Super User
Offline Off
@user Gaios: Yeah and I'm getting used to that nowadays.
11.12.17 08:11:09 am
like I like it!
Up
Gaios
Security Supporter
Offline Off
@user Masea: That's what I did in my framework..
11.12.17 06:05:14 am
like I like it!
Up
Masea
Super User
Offline Off
I'll check it once I'm home. Something probably I want.
To the start Previous 1 Next To the start