Jump to content

Callback Functions


Icare
 Share

Recommended Posts

They are probably good for physics audio. So when a body collides or sweeps over another body, the material callback would determine which sound to play. For example metal against wood, metal against sand, wood against glass, wood against rock, etc...

Every game has that.

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

In Blitzmax you use Byte Ptr, something like:

 

SetEntityCallback (mesh, Byte Ptr(myCallBackFunction), ENTITYCALLBACK_COLLISION )

Function myCallBackFunction( ent:TEntity )
   'do stuff here with ent
End Function

desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP

laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32

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