View Single Post
Violet CLM

JCF Éminence Grise

Joined: Mar 2001

Posts: 11,090

Violet CLM has disabled reputation

Feb 27, 2013, 11:13 AM
Violet CLM is offline
Reply With Quote
Quote:
Originally Posted by Jerrythabest View Post
You know what would be useful? A reverse-lookup for enums. Like
Code:
jjEnum(2, WEAPON::Weapon);
returns "ICE".
Doesn't seem to be a thing AngelScript supports, and presumably for good reason. Not all integers have exactly one enum value that represents them -- some have zero, some have two or more.

Quote:
Originally Posted by cooba View Post
Sharing is caring
Would o.objType | 16 == 16 work there in place of the long list of eventIDs? Also IIRC you should specify the creator ID in jjAddObject as p.playerID, to ensure the right player gets points for destroying the enemy.
__________________