hi below is a switch case that is suppose to go to the next
"hep" # and show a message... so if hep is 0 it shows one message, if hep is 1 it shows another, etc.
I have it showing a message for 0, and 1, but it ALSO goes back to 0! I thought the case switched with ++hep so its not 0 anymore...pplease advise?
if(Item *item=CAST(Item, obj[i]))
if(item.type==ITEM_MISC && item.mesh && Dist(test_pos, item.mesh->box*item.matrixScaled())<=ctrl.radius()+0.1f)
{
int hep;
hep=0;
switch(hep)
{
case 0:
if ( item.name=="barrel" && hep==0)
// }
++hep;
AddMessage(S+"000er"+ hep);//1
// (itemPickUp(*item));
break;
case 1:
if ( item.name=="biggun" && hep==1)
//void itemRemoved();
++hep;
AddMessage(S+"111111er"+ hep);//1
// (itemPickUp(*item));
break;
case 2:
if ( item.name=="Spirit" && hep==2)
++hep;
AddMessage(S+"333333er"+hep);
itemPickUp(*item);
break;
}
}