Meldrion Posted June 4, 2010 Share Posted June 4, 2010 Good evening. I try to make simple collision Events ( when u hit the Invisible Trigger, a Sound starts to play etc) with Delphi 7. Well the problem I have, is that when I hit my Trigger I get an AccessViolation. I know that this was reported as a Bug and Josh fixed it but still, it is not working for me. EntityType(MyController,1,1); EntityType(CollisionBox,4,1); Collisions(1,4,2); SetEntityCallback(CollisionBox,@EntityCollisionCallback,ENTITYCALLBACK_COLLISION); in my MainLoop i call this for testing: MessageBox(CollisionInfo); Here are some functions I made in order to make things easier for me: procedure MessageBox(Text:string); var Texture: TTexture; begin SetBlend( BLEND_ALPHA ); Texture := LoadTexture('abstract::textbox.dds'); DrawImage (Texture,10,10,600,120); SetColor ( Vec4(255,255,255,255) ); DrawText(30,30,pChar(Text)); end; procedure EntityCollisionCallback(entity0:TEntity;entity1:TEntity;position:Pointer;normal:Pointer;force:Pointer;speed:real );stdcall; var VecPosition: TVec3; begin CollisionInfo:= GetEntityKey(entity0,'Name'); end; Btw: The @T means the AdressOf(T) in Delphi I hope someone can help me out, cause this is about to drive me crazy. Quote Link to comment Share on other sites More sharing options...
Masterxilo Posted June 30, 2010 Share Posted June 30, 2010 Were you able to solve this? What about the calling convention (needs to be __stdcall)? Is it set correctly? Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Recommended Posts
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.