Jump to content

LUA engine_const what and how?


Chiblue
 Share

Recommended Posts

I am finally working through building my collision controls into editor so I can use LUA to control the collisions of my entities...

 

I have been looking at the engine_const script and are a little confused... can someone explain how these are used and why they are there, they do not represent enttiy types, I understand that these are used to define what gets rendered in the scene, but can we add our own, how are these attributed to the entities and is there a entity key for these constants?

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

Link to comment
Share on other sites

Every model that has a script has a Physics tab in the properties. You can see the collision types defined there. You can define your own manually in a script with EntityType().

 

Yes I have changed the collisino types which seem to be working, but there is the engine_const and these are not the same as he collision types... I see that these are used for rendering, but how do they get assigned to the entity?

 

ENTITY_MESH=1
ENTITY_EMITTER=2
ENTITY_MODEL=4
ENTITY_BODY=8
ENTITY_TERRAIN=16
ENTITY_BONE=64
ENTITY_CAMERA=128
ENTITY_CORONA=256
ENTITY_LISTENER=1024
ENTITY_PIVOT=2048
ENTITY_MESHLAYER=4096
ENTITY_POINTLIGHT=8192
ENTITY_SPOTLIGHT=512
ENTITY_DIRECTIONALLIGHT=16384
ENTITY_VEGETATION=32768
ENTITY_ALL=ENTITY_MESH+ENTITY_EMITTER+ENTITY_MODEL+ENTITY_TERRAIN+ENTITY_BODY+ENTITY_BONE+ENTITY_CAMERA+ENTITY_CORONA+ENTITY_POINTLIGHT+ENTITY_SPOTLIGHT+ENTITY_DIRECTIONALLIGHT+ENTITY_LISTENER+ENTITY_PIVOT+ENTITY_MESHLAYER
ENTITY_RENDERABLE=ENTITY_VEGETATION+ENTITY_MESH+ENTITY_TERRAIN+ENTITY_CORONA+ENTITY_EMITTER+ENTITY_SPOTLIGHT+ENTITY_POINTLIGHT+ENTITY_MESHLAYER

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...