Jump to content

Class Names from LUA script?


Chiblue
 Share

Recommended Posts

I have created a new entity in LUA called info_spawnpoint_node.lua along with associated files...

 

When I ready this in my code the class name appears as "info_info_spawnpoint" why? what dictates the class name when using in the scene?

 

the path to the entity is Models/Entities/info/Spawn/Node/

 

Can someone explain how the class names are derived?

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

I didn't even think classname was part of Lua. Did that chance recently? I know it was around before Lua but then I thought it was removed with Lua.

 

I would assume you would be able to set that variable yourself inside your Lua class assuming it's now a variable in the base Lua class.

Link to comment
Share on other sites

Well maybe I did not explain it...

 

The code that pulls this is "cn=GetEntityKey(e,"classname");"

 

Which assumes it is a key in lua, but my lua script does not set this value as I thought is defaults to the script name??

 

Or am I confusing it or myself and add classname as a key within my script?

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...