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

2017/11/6

Shooting Plus Animation

Diaspro Diaspro

2017/11/6

#
Hi i need help with coding. I have been researching the code for doing a shooting plus animation. How do i write a code that will do the animation first before it shoot the bullet and when the bullet hit the edge it will automatic disappear
danpost danpost

2017/11/6

#
The bullet hitting the edge part goes in the act method of the class of the bullet. Basically, if this is at edge, remove this from world. For the timing of the shot, would need to see how the animation is run (provide code).
Diaspro Diaspro

2017/11/7

#
Sorry i don't really know how to write the code for the animation and the shooting also. Can you also teach me on how to write the code for having a animation first then after that the bullet will be shoot out then if the bullet touches the edge the bullet will then disappear
danpost danpost

2017/11/7

#
Diaspro wrote...
Sorry i don't really know how to write the code for the animation and the shooting also. Can you also teach me on how to write the code for having a animation first then after that the bullet will be shoot out then if the bullet touches the edge the bullet will then disappear
Do you have images for the animation and if so what form are they in (individual images or in a gif file)?
Diaspro Diaspro

2017/11/7

#
This is the first position https://drive.google.com/open?id=0B7HUPxK0EVxFT2RWVktkNGhIcm8 then key press down will turn into this position https://drive.google.com/open?id=0B7HUPxK0EVxFZk1iMktjUjdfZm8 this is the image that will be shooting https://drive.google.com/open?id=0B7HUPxK0EVxFRkF0RUZDaDJGeEU Yes all is individual images. I was thinking if the code can be that when he swing his sword down the shooting will come out and then he will be back at the first position.
danpost danpost

2017/11/7

#
Too confusing. The second image shows sword down, which say at the end is when you want to shoot; but the third image, which seems to consist of 4 images, is the image which you say will be shooting. All too confusing.
You need to login to post a reply.