How this COAL functions do?

Pop your head in here if you have problems.

Moderators: andrewj, Corbin, Lobo

User avatar
Karnizero
Posts: 370
Joined: Sun 08 Mar 2009 2:45 am
Location: Espa

How this COAL functions do?

Postby Karnizero » Wed 02 Dec 2009 3:09 pm


User avatar
Dartmerc
Posts: 570
Joined: Tue 21 Aug 2007 3:25 am
Location: Sydney
Contact:

Postby Dartmerc » Wed 02 Dec 2009 11:15 pm


User avatar
Karnizero
Posts: 370
Joined: Sun 08 Mar 2009 2:45 am
Location: Espa

Postby Karnizero » Thu 03 Dec 2009 10:22 am


User avatar
andrewj
Posts: 698
Joined: Sat 05 May 2007 11:22 am
Location: Tasmania

Postby andrewj » Thu 03 Dec 2009 11:45 am

Many math functions (math.floor, math.sin etc) are the same as in Lua, see:

sys.assert() was replaced by plain assert(). It is for checking that something is the way you expect, e.g. assert(x != 0) will produce a fatal error when x is zero.

math.getx() and gety() and getz() take a vector (remember vectors are three numbers 'x y z') and return just one part of it.

hud.get_time() returns a number which increases by 1 every tic (i.e. 35 times a second). hud.grab_times() is there to compute the hud.passed_time variable.

player.is_grinning() and player.main_ammo() are the same as described in the LuaHUD manual on the website.


Return to “Help!”

Who is online

Users browsing this forum: No registered users and 6 guests