Got barrel working

This commit is contained in:
Sachith Hasaranga Seneviratne 2014-08-06 10:07:45 +05:30
parent ef17ad8072
commit f27ed7b144
2 changed files with 8 additions and 5 deletions

View File

@ -1,16 +1,18 @@
void onKartObjectCollision() void onKartObjectCollision()
{ {
if (getCollidingID()=="stklib_fitchBarrelTestDestroyed_a"){ if (getCollidingID()=="stklib_fitchBarreltest_a_main"){
int kart_id = getCollidingKart1(); int kart_id = getCollidingKart1();
Vec3 location = getKartLocation(kart_id); Vec3 location = getKartLocation(kart_id);
//createExplosion(location); createExplosion(location);
disable("stklib_fitchBarreltest_a_main"); disable("stklib_fitchBarreltest_a_main");
enable("stklib_fitchBarrelTestDestroyed_a");
enable("stklib_fitchBarrelTestcovert_a");
} }
else { else {
displayMessage("Woot! You hit item of ID: " + getCollidingID()); /* displayMessage("Woot! You hit item of ID: " + getCollidingID());
disable(getCollidingID()); disable(getCollidingID());
Vec3 explosion_loc = Vec3(79.53,0.07,97.13); Vec3 explosion_loc = Vec3(79.53,0.07,97.13);
createExplosion(explosion_loc); createExplosion(explosion_loc);*/
} }
} }

View File

@ -1,4 +1,5 @@
void onStart() void onStart()
{ {
disable("stklib_fitchBarrelTestDestroyed_a");
disable("stklib_fitchBarrelTestcovert_a");
} }