Dateien

> > CS2D > Lua Scripts > Vehk's Lua Wrapper
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch Vehk's Lua Wrapper >

5 Kommentare13 kb, 410 Downloads

alt 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
Mehr >


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).
2× editiert, zuletzt 16.12.17 23:44:31
Zugelassen von SQ

Download Download

13 kb, 410 Downloads

Kommentare

5 Kommentare
Zum Anfang Vorherige 1 Nächste Zum Anfang

Logge dich ein!

Du musst dich einloggen, um selber Kommentare verfassen zu können!Einloggen

alt 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!

alt

Masea
Super User Off Offline

@user Gaios: Yeah and I'm getting used to that nowadays.
Ich mag es!

alt

Gaios
Reviewer Off Offline

@user Masea: That's what I did in my framework..
Ich mag es!

alt

Masea
Super User Off Offline

I'll check it once I'm home. Something probably I want.
Ich mag es!
Zum Anfang Vorherige 1 Nächste Zum Anfang