hi guys, I have a counter and I want it to reset to 0 when it goes over a certain area of the game, in this case the base camp. please help thanks
counter = 0;
if (getOneInetersectingObject(BaseCamp.class) != null) //In other words, if a BaseCamp object is interesecting this, and exists
{
counter = 0;
}public void scorer()
{
world worldWorld =(world) getWorld();
Counter counter = worldWorld.getCounter();
counter.bumpCount(-1);
} public void atbasecamp(){
locationytwo =getY();
locationxtwo =getX();
if(locationxtwo==6&&locationytwo==3) {
while(passengerscarrying>0){
world worldWorld = (world) getWorld();
//need to call your counter like you do in line 4 of the post above
counter1.add(-1);
passengersleft=passengersleft-1;
passengerscarrying=passengerscarrying-1;
}
//send to where you want it to go next
}
}