Files

> > CS2D > Lua Scripts > Vehk's Lua Wrapper
Files overviewCS2D overviewLua Scripts overview

English Vehk's Lua Wrapper >

5 comments13 kb, 440 Downloads

old Vehk's Lua Wrapper

Vehk
User Off Offline

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 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
Approved by SQ

Download Download

13 kb, 440 Downloads

Comments

5 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old Bugfixes

Vehk
User Off Offline

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!

old

Masea
Super User Off Offline

@user Gaios: Yeah and I'm getting used to that nowadays.
I like it!

old

Gaios
Reviewer Off Offline

@user Masea: That's what I did in my framework..
I like it!

old

Masea
Super User Off Offline

I'll check it once I'm home. Something probably I want.
I like it!
To the start Previous 1 Next To the start