Jump to content

List of bodies


xtreampb
 Share

Recommended Posts

Hey all,

 

I'll tell you what i'm trying to do. When a body gets below a certin y value i want to remove it. However, i have multiple bodies falling at once. How would i determine if a random body has fallen past lets say -5. I don't know the object in the code, it is a random object so i can use a specific 'box3.getpos().gety'. I need to use a more generic form of code. so that if any body falls, i can catch it. I could use another 'ground' that has collisions type of 2. But i don't know how do use the collisions callback functions. Do anyone else have an idea, and/or can some one show me how to set up the collisions callback?

 

Thanks

 

~Xtreampb~

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Link to comment
Share on other sites

ok so i'm using the "ForEachEntityDo((byte*)mFunc);" however, this doesn't execute

if(KeyHit(KEY_SPACE))
  {
   DropBox(box);
   if(EntityExists(ground))
    FreeEntity(ground);//this doesnt execute here
   else
    goto CreateGround;
  }

if i comment out the ForEachEntityDo call it works no problem. i've tried commenting out what the called function does to where it is an empty function and still the same result. Any help would be appriciated. This is just me messing with the engine so no real importance to where this has to work. just learning atm.

 

Thanks

 

~Xtreampb~

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

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