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

Report as inappropriate.

askgriff
askgriff presents ...

2013/10/26

Tank Test

I'm trying to keep the turret "attached" to the tank. I would like to getX() from inside the turret to access the position of the tank -- and the rotation. Sounds like a danpost question. :) If someone can look at my code and tell me what I can do, I would appreciate it.

1687 views / 2 in the last 7 days

Tags: game music demo food sounds zombie turtle survivor trick fx

open in greenfoot
Your browser does not support the canvas tag.
askgriffaskgriff

2013/10/26

I should have mentioned that it starts off just fine -- but as I drive around and turn, the turret gets out of sync. Pretty soon you're driving two separate "vehicles". :/
danpostdanpost

2013/10/26

Please start a discussion thread putting forth these questions.
KartoffelbrotKartoffelbrot

2013/10/26

I can help, too. I've made also a tank game.
A new version of this scenario was uploaded on Sat Oct 26 19:04:47 UTC 2013 Thanks to Danpost and Kartoffelbrot, I have the tank moving independently (WASD and arrow keys). Yay!
shrucis1shrucis1

2013/11/7

Hey, askgriff, can I use your tank sprites in a game?
askgriffaskgriff

2013/11/7

Absolutely, shrucis1. I got the originals from OpenGameArt.org (http://opengameart.org/content/tank-sprite) . I modified it so that it would have moving tank treads (using two images). Also, I changed the colors of the tanks so I could have two different "teams" and then I changed the cannonball to be more round than square. Either way, you're welcome to use the ones from the website or from my scenario.
askgriffaskgriff

2013/11/7

I should have also mentioned that in my Micro Tank Battle that I keep playing around with, I have the two tanks and the turrets operate separately. It's here: http://www.greenfoot.org/scenarios/9734
shrucis1shrucis1

2013/11/7

Thanks! I'll let you know when I finish the game.

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.