This site requires JavaScript, please enable it in your browser!
Greenfoot back
Yurey
Yurey wrote ...

2015/4/26

I have more problems than thought ^^'

1
2
Yurey Yurey

2015/4/27

#
ok the actual script of the Teufel:
 private void getDamage()
    {
         if (getOneIntersectingObject(Engelfireball.class) != null)
        {  
           dmgCount++;
        }
    }
it dont work like i would like it because the teufel still dies instantly some one have a idea ?
danpost danpost

2015/4/27

#
Well, if you are not going to remove the intersecting Engelfireball object, then the boolean 'loseLife' would probably be necessary. Add the 'loseLifereset' call to the act method and build the method, having it set the 'loseLife' field back to true if no Engelfireball objects are currently intersecting the Teufel object.
Yurey Yurey

2015/4/27

#
can u write me a code with the necessary methodes i dont have that high level programming skills ^^'
danpost danpost

2015/4/27

#
Yurey wrote...
can u write me a code with the necessary methodes i dont have that high level programming skills ^^'
It would be the opposite condition to what you have in line 3 in your last code post.
You need to login to post a reply.
1
2