Forum

> > CS2D > Scripts > Entity Name to Type
Forums overviewCS2D overview Scripts overviewLog in to reply

English Entity Name to Type

4 replies
To the start Previous 1 Next To the start

old Entity Name to Type

Mami Tomoe
User Off Offline

Quote
Hello! Is there a way to convert entity name to type?

For example:
My_Wall
->
Func_DynWall


But the name doesn't always have the type in it.

old Re: Entity Name to Type

DC
Admin Off Offline

Quote
• use cs2d lua cmd entitylist
• iterate over all entities and check if the name matches the one you're looking for with cs2d lua cmd entity name
• use cs2d lua cmd entity typename

This isn't the fastest thing but luckily entities don't change. So if you need to get the result multiple times you should save it instead of iterating over all entities all the time.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview