Container issue

0 favourites
  • 13 posts
From the Asset Store
A well commented Dynamic Heart Containers template to learn from or to use as a base for your own game!
  • Hi,

    I tryed to create a tank with a turret using containers. The good new is that I did it and I played with the tank and the turret , inmersed myself into a deep hapiness I want to go further and I create another tank object, then I made that when the bullet touch the turret this flashes.

    The bad new is that after that, the base of thank nevermore was attached to the turret.

    What is wrong?

    Attach the capx https://dl.dropboxusercontent.com/u/12412208/test_basic_2_tanks.capx

    Salut,

    Josep M

  • Any idea why I'm doing wrong?

  • Apply vehicle behaviour for turret also. the container is not broken when creating the turret, rather, It doesnt have the same default movement set by behavior .

    Edit: dont forget to move the initial tankturret on the base if you are going use it on the same layout.

  • I guess that when the tank+torret work I don't assign any vehicle behaviour, but I will try.

    Other thing is how spawn a bullet without make a collision with myself and autodestroy myself the only I found is fire when the turret is on the left or right side of the tank base.

    Other effect I trying is that the bullet have a limited range of impact. I test the the distance without results.

    How can spawn a bullet from the container with the objective of destroy others containers created on start layout?

    How can simulate the cannon range?

    Thanks in advance,

    Josep M

  • Make bullet not collide with you, isnt that an answer in question ) say an enemy tank, the enemy tank gets busted, and so does your bullet.

    Just look threw all of the examples, they are must go threw, if you have a license as I see you do and you intend to get some money from that investment of yours.

    I am in the process of making a full free game myself(demo link available to see if you klick my name and scroll down). A week ago I had zero experience in making any sort of game, let alone say programing, music, art for games. in 4 days I had that demo cooked up and posted on Arcade. I cant imagine what will come out of it eventually, but I am sure some people might really like it.

    So good luck with your creation!

  • Hi SharpedX,

    I tryed your game and is very addictive. Can I recover energy during the game?

    Yes, I don't have doubt that the posibilites of the C2, and I have two ideas to build with C2. If you need help with graphics I will very glad to help you. Just contact me.

    Salut,

    Jospe M

  • I tryed adding the behaviour to the turret and now I have the tank+turret moving together, but when I rotate de turret, this go away...

  • I tryed adding the behaviour to the turret and now I have the tank+turret moving together, but when I rotate de turret, this go away...

    Thanks for offering me help with graphics, but that is kind of my strongest side, so I probably wont need that kind of help. Tough I admit I do have a lot of room for improvement.

    I tried out your capx, and I didnt encounter that problem. all I did btw was add the vehice behavior for the turret also, so I dont know what is going on with your tank right now. Upload the new capx and I will take a look at it.

    I actually dont get it how come you are having so much trouble with them , my test tank with turret was moving for quite well and for my game I am using different kind of behavior for my main(wheele has physics) sprite and turret( gun has solid). Same applies for my enemies, enemy main sprite has bullet and solid behavior and the turret has just turret and pin behavior.

  • If you move the tank and then move left or right and then move the turret you can see the effect..

  • Is the capx linked above the one your having problems with? Do you still need help?

    I'm working on a Tank game myself and could share my mechanics.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes, please

  • Apply vehicle behaviour for turret also. the container is not broken when creating the turret, rather, It doesnt have the same default movement set by behavior .

    Edit: dont forget to move the initial tankturret on the base if you are going use it on the same layout.

    You do not need to had the same behaviour to the turret. If it's pinned, it's pinned.

  • Here we go:

    Assuming your tank is the main character, I would place him where you want him to appear and not create it at the start of the layout. But if you have a reason to do so, destroy the original sprites as well has the bullet, etc... before creating you container and pinning the turret.

    I've also learned that order is important, so you want to create your container before you pin the turret.

    Changes: Removed turret behavior from Turret sprite (not needed), Removed second frame from bullet and created a sprite with that second frame.

    I've attached the new capx have a look.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)