How do I create score

Get help using Construct 2

Post » Wed Feb 10, 2016 10:43 pm

Message: tiagosr1 can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
Heeeello people! good night.

I have one question. u can help-me?

my project game is one war of cannons multiplayer 2D and I have some doubts.

How i create it:

each cannon has 5 shots and each time the player shoots he misses a shot when he shoot 5 times will reload the cannon. how do I represent it in the game? to let him know how many shots still have?

for example:

I want to make the player know that he's still got three shots left to reload the gun . I created the sprite and will represent it with 5 small ammunition upon cannon, each time the player will shoot dec 1 sprite(ammunition) . How do I create a script to place it on c2 ? can someone explain me with picture if possible ?

here one example with image:
http://imgur.com/xUKq4WT
http://imgur.com/xUKq4WT
Image
B
4
Posts: 23
Reputation: 248

Post » Thu Feb 11, 2016 12:33 am

Create a variable (lets called it "ammo") and set it to 5
I guess you already have an event for shooting, go there and add the effect "substract from variable".

Basicaly what you want is to substract 1 from the variable "ammo" every time you shoot.
Then you should have another event so when "ammo" gets to 0 the reload happens.

Im not sure if thats what you are looking for.
B
10
S
1
G
1
Posts: 21
Reputation: 1,011

Post » Thu Feb 11, 2016 3:18 am

adding to @Ogloth if ammo = set frame to bullet count.
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Thu Feb 11, 2016 2:36 pm

Olgoth wrote:Create a variable (lets called it "ammo") and set it to 5
I guess you already have an event for shooting, go there and add the effect "substract from variable".

Basicaly what you want is to substract 1 from the variable "ammo" every time you shoot.
Then you should have another event so when "ammo" gets to 0 the reload happens.

Im not sure if thats what you are looking for.



I already have this system, so i need add the hud beneath the tank to show how many shots are left. I create a sprite of bullet and the empty capsule. how i make it?
to show how many shots are left to players?
B
4
Posts: 23
Reputation: 248


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests