Game Development Community

Expose enum to script

by Ron Yacketta · in Torque Game Engine · 07/31/2003 (8:09 am) · 2 replies

Hello all!!

Been searching for a way to expose a c++ coded enum to script, is it possible?

-Ron

#1
07/31/2003 (9:22 am)
Checkout Item class, I know it enumerates the light fx types (which are available to the script).

I would post the code, but I'm at work right now... :(

Hope this helps...

John.
#2
07/31/2003 (1:16 pm)
I was looking for the same thing. Inside ShapeBase, they expose the DamageState enum by creating a string set of the state names. Then two functions that set/get damage state by this string, which index into the actual enum defined in the ShapeBase class.

Maybe this will help?

- Brett