Big step back with my game w/EventSheet

Get help using Construct 2

Post » Sun Dec 02, 2012 4:48 pm

Everything was going fine with my game...

I have 2 tanks, Ally and Enemy. When they get hit 5X they destroy with a small explosion. I was working with the enemy tank destroying the ally tank. Worked good. It's not a Mona Lisa but I was estatic with myself that I got this far....

But, as I was looking at the conditions/ events and actions, things looked like they should be together. As in - some enemy actions were not grouped with the enemy tank and vice versa for the ally tank. I moved a couple of things and now the tanks shoot but there are not any explosions, and when the ally tank is destroyed the tank is destroyed but the turret jumps to top left corner.

Sorry if the event sheet is a bit messy, still learning on how to group things together. Any tips on that would be appreciated.

Oh, and how do you get that cool red dropbox link in your post? I tried but it kept coming out as copy/paste link.


https://www.dropbox.com/s/ni5799ku311wipa/Victory%20Tank%20-2r2x0mft2cwrh-2r2x0mft2cwrh.capx?m

jeffige2012-12-02 20:30:35
B
31
S
16
G
10
Posts: 443
Reputation: 9,207

Post » Sun Dec 02, 2012 9:15 pm

I've tried to organize it a bit so it's easier to read, add and modify stuff. The tanks are now both containers (a new feature!).

I hope this will help you a little bit and give you ideas how you can do stuff in the future.

https://dl.dropbox.com/u/4898391/Tanks.capx

*edit* didn't upload the latest one, should be up-to-date now.Julmust2012-12-02 22:01:40
B
16
S
6
G
6
Posts: 100
Reputation: 4,840

Post » Sun Dec 02, 2012 10:10 pm

[QUOTE=Julmust] I've tried to organize it a bit so it's easier to read, add and modify stuff. The tanks are now both containers (a new feature!).

I hope this will help you a little bit and give you ideas how you can do stuff in the future. [/QUOTE]

Man, that is a beautiful thing. Thank you. Now, I know how things should look.

One question, ok, three. Can you expand a bit on what you did with the "group shoot"?

Why the collisions variable on the bullets family to check if player or enemy?

Why deactivate the "shoot group" until player presses fire?

Again, thanks so much. It does seem a bit alien to me. But, it will make me learn.

B
31
S
16
G
10
Posts: 443
Reputation: 9,207

Post » Sun Dec 02, 2012 10:17 pm

No problems :)

Groups are a beautiful thing. When you create one, you can make it off by default and activate it through action. So, when I created the group I made sure it was off (rick click > edit > check "active on start").

The group "shoot" is there to make it simple to read and modify. I also added it to give you ideas how to use "groups". The beautiful thing with groups is that it's a very easy way to optimize the program and make it easier to read.

The variable "player" or "enemy" is there for information. You can use it later on to distinguish, let's say how powerful the bullet is depending if you have a powerup. Right now I added it to check if it's a bullet from the player, if it is, the bullet won't hit the player only the enemy.

The number one tip I have is to make construct do all the work. It has a very intelligent picking system when you start asking yourself on every event "Which objects will construct 2 pick when I do this condition?".

If you have anymore questions just ask.Julmust2012-12-02 22:24:30
B
16
S
6
G
6
Posts: 100
Reputation: 4,840

Post » Sun Dec 02, 2012 10:33 pm

[QUOTE=Julmust] No problems :)

If you have anymore questions just ask.[/QUOTE]


Remember, you offered>

So, the game mechanics are almost there. Just a few additions then on to creating the levels.

I'm going to add a health variable for the 2 tanks to be destroyed and a quick 3 frame explosion animation (actually 3 different actions cause I cant figure out the sprite sheet making as of yet), in what group should I put these? Shoot/ enemy shoot for explosions and variable? Or just add another group?



B
31
S
16
G
10
Posts: 443
Reputation: 9,207

Post » Mon Dec 03, 2012 12:04 am

There is no real rules, you just have to think what's easiest for your way of working :)

Logically though, the shoot group should only concern the mechanics that involves shooting.

the health variable can be modified per tank, just select the tank and change the "health" to something else.

I would add the explosion under the "tanks health = 0" event. As a sub-event probably.Julmust2012-12-03 00:05:17
B
16
S
6
G
6
Posts: 100
Reputation: 4,840


Return to How do I....?

Who is online

Users browsing this forum: jul, nimos100 and 18 guests