How do I create this 1 vs. 1?

Get help using Construct 2

Post » Thu Oct 30, 2014 10:46 am

Hey guys,

the idea is to create a 1 vs. 1 game, with different characters and levels the player can choose from. For example's sake i'll keep it easy:
In the start menu, each player can choose between character A, B, C and together they'll choose setting(level) X, Y, Z. The setting includes different enemies and environments. The players can choose different weapons and stuff too. Of course, all this has to be loaded into the gamescreen.

My question is, do I create events for everything separately, or are there any techniques to make this easier? Have you created any examples, or tips to help me further? Is it advised to use global objects for this?

Thanks in advance!
B
6
Posts: 4
Reputation: 272

Post » Thu Oct 30, 2014 12:38 pm

Well, there is not a definite answer for this question as it depends a lot on your project.

I'll assume you mean you are on a first layout when you decide your games "settings". And the game happens on another layout.
To transfer informations from a layout to another you have several tools.

Global variable is one of them. Array and dictionary are another.
Just consider, in the start of layout for your "game" layout to go check the values of either the global variable and/or array/dictionary (depending on what data structure you decided) and set the current layout according to those values.

You have three character to chose from which can be controlled either by player 1 or player 2.
It means that one instance of character will be destroyed to only leave the two instances chosen by the players.
One instance will be assigned to the first player, the other to the other player. (For more informations on how to assign instances to a player or another check out my Bomberman-like tutorial).

Then you apply the X,Y, Z settings.
Etc...

It is up to you to "program" for yourself what values you will have to pass from the first layout, and how to "interpret" those values on your second layout so that it makes a consistent game.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
291
S
114
G
95
Posts: 7,293
Reputation: 70,144

Post » Thu Oct 30, 2014 8:24 pm

Try to use groups. So you can enable/disable depending on the char the player selected.
B
33
S
5
G
1
Posts: 163
Reputation: 2,693


Return to How do I....?

Who is online

Users browsing this forum: batto, bclikesyou, Lancifer and 23 guests