Tank game in multiplayer

0 favourites
  • 3 posts
From the Asset Store
Everything is made via physics, Very simple code: 6 events only (3 for tank creation, 2 for controls and 1 for camera)
  • Hi bros,

    I am really interested in making online games, but now i have some problems. I am real new to multiplayer

    1. I make multiple characters, but i dont know how to.

    Eg. there are 3 different kinds of tanks so how can i change animation frame in multiplayer

    2. Each tank has its own turret, i want to pin it to tank, but i cant.

    Eg, i choose tank 1 which has its own turret. Tank 2 and tank 3 has its own turret too....so how cna i do that

    If any one has capx..i really aprreciate. Thanks. Help help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1. If you are talking about local multiplayer (as in two players using the same keyboard on one screen) then it's pretty straightforward. Just give the tank the desired movement behavior and then set both tanks' controls to different keys. If you have different tank images on different frames then set the animation speed to 0, then you can either set the frame in the properties bar or via the action: Tank - > set frame.

    (if you want to tackle online mutliplayer then just really don't.)

    2. If you have multiple turrets and multiple tanks to pin them to, you need to "tell" C3 which ones belong together.

    I think the simplest way to do that is to create the turrets in game as opposed to doing that beforehand.

    Basically it would go something like this:

    • Tank->on created

    * Tank: spawn another object (Turret)

    * Turret: pin to object (Tank)

    Explanation: Since you create the Turret inside the Tank's "on created" scope, C3 will "take into consideration" the particular instance of Tank and Turret that should be pinned together.

  • Thanks for your reply. I just wonder Is it possilbe to make such a tank game i mention with c2..online multiplayer i mean.

    I still not understand much about multiplayer. To be more specific, i have 2 tanks E100 and T62 ( each has its own turret). I will try what u show me.

    Now what really care is that choosing what tank to play in game

    I created an obj with 2 frame. Frame 0 = e100, 1 = t62

    Then creat a global variable for this called "choose tank". Eg: when choose tank = 1, set animation frame 0, choose tank = 2, set frame 1. And set this as sub event in host. Everything is ok to host player, but useless to peer player when logined.. this drives me crazy ;(((

    Can u show me how to do this?

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