# A few questions :)

So i’m trying to make a 2D war game where players take turns moving their units and ordering attacks, but i’m a little confused on what to do here, how do i make a unit(like a tank factory) that can build units? , since its played on turns,how do i make it that when,example: player 1 has finished his turn then he wont be able to move units or build units until player 2 has finished the turn? and also do i need like an Array variable so it can handle alot of units? Thx in advance,i’m still quite a noob at these things

I haven’t played a lot of war games. So I don’t know what you mean by “units” but I assume your trying to make a tank factory make tanks? You could use a timed event and make it create a tank every few minutes. Oh and for taking turns. You might could do something like in the picture I posted. Use a variable to check which turn is which. If P1_turn = 1 then he can drag his tank around. If P1_turn = 0 then it’s not his turn thus he can’t drag his tank.

I made a little tutorial on some of this but can’t upload to Youtube until I go to the city next week (internet here is way too slow). I’ll link the tutorial here once it’s uploaded.

Well…i don’t want it exactly to create a tank everytime, i want it to be like in games like C&C Generals,Warcraft III etc. that when you “click” on the factory then a menu pops up and you choose what kind of unit you like to build/create. And also “units” are like Tanks,Soldiers,Jets in games

I’m looking forward to see it .

Instead of it creating a tank you would do it using variables so every say 10 seconds you would +1 to variable amount of tanks for the specific amount of time.

If you wanted the specified number of tanks to finish all at the same time you would set a variable for time so you can multiply that variable by how many units you want this also makes it easier to reduce timers, if you upgrade a building for instance.

Hmm… i think i’ll try that.