Jump to content

Entity Type


Chris Adkins
 Share

Recommended Posts

I am going through the tutorials, and trying to not only copy and paste the code out of them to hope and frankenstein a game together, but to actually understand what is going on in them as well. That is where this question comes from. What is the difference between EntityType(entity, 1) and EntityType(entity, 2)?!? Thanks for clarifying this for me!

userbar792791.gif
Link to comment
Share on other sites

The actual number of EntityType doesn't have a predefined meaning, it's just a number you use in combination with the Collisions() command to define which EntityTypes should collide with which EntityTypes and how (sliding, stopping, informational) and how deep (recursively all childs or just the body in question).

 

In addition you can also use the SetCollisionCallback() command to add automated program code which is executed when a collision of specifed EntityTypes happens. For example, in addition to the normal sliding collision of a rock on a slope, it would also emit a rumbling sound, and why not also some dust particles.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Wow thanks. That actually makes sense to me. Does this mean there is hope for me eventually? Joking. Thanks for the indepth explanation though. Would it be asking a little too much to ask for an explanation on how to effect the interactions (ex. sliding, stopping, informational).

userbar792791.gif
Link to comment
Share on other sites

That's where the wiki comes in handy: http://www.leadwerks.com/wiki/index.php?title=Collision#Collisions

Actually LE doesn't have other collidable collisions than sliding collision, probably because the behaviour is then handled by physics settings (BodyFriction, BodyBounciness, etc...), I remembered it from Blitz3D which has no physics and needs to simulate that behaviour via the Collisions command. Also the recursiveness is set with EntityType.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

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