How do I

Get help using Construct 2

Post » Thu Sep 10, 2015 7:44 am

Message: luckyrawatlucky is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
in my game
i need :
1) i want to display 10 bullets
> > on each spawn it should reduce 1 by 1
2) give 3stars if success with 1 bullet, 2 star with use of 2 bullet, and 1 star with 3 bullets and others are blank
>> for star i have used this link 3) i want to unlock bg colours options with earned points

Pls help me that how do I
Image
B
68
S
40
G
48
Posts: 680
Reputation: 34,076

Post » Thu Sep 10, 2015 9:31 am

Hello :)
I think I can help.

1-
For your first problem, I don't know if this is the better way to do this, but this is how I've done it in all my games so far.
Create a sprite to display the amount of bullets you want, and set the each frame with a number of bullets.
For instance, in the frame 0 you put nothing, at frame 1 you draw 1 bullet, at frame 2 you draw 2 bullets and so on. Then you create a variable to keep track of the amount of bullets the player still have, starting with 10 and decreasing every shot. And for last every time the player shoot you create the condition to decrease the value from this variable and at the same time set the frame of your sprite to the value of your variable. Therefore, if the variable is 10, the sprite frame will be 10 and it should display 10 bullets, after you shoot the variable should change to 9 and then the sprite frame should change to the value of the variable ( 9 ) displaying then... 9 bullets.

2-
This is quite simple actually, all you need to do is at the end of the game is check the remaining bullets o-o
You know the player starts with 10 bullets, so if he finishes the game with 9 this means the shot only once, give him 3 starts. Nothing much to explain here.

Hope I could help :D
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Thu Sep 10, 2015 11:06 am

thanks for you response
but can u pls send me a sample of it
Image
B
68
S
40
G
48
Posts: 680
Reputation: 34,076

Post » Fri Sep 11, 2015 10:20 am

Hi
I have try this method
now one problem is occurring
i insert sprite for counting bullets
and there are 11 frames 0,1,2,3 ... 11
0 for nothing and 11th for 10th bullet
i gave variable 10
but when I test shooting
at starting it works fine but when there 2 bullets remaining both goes invisible together and after being blank gut hitting 1 bullet
in short counting wise bullets are OK but visibly last two bullets goes out together

pls help me at this

edited :

actually i have done a big mistake which give me headache for two days
i was thinking what wrong i m doing
even i have checked every event step by step
.
Actually in 1st frame of bullet i have somewhere clicked anchor point by mistake
.
.
today when i was again checking every frame then i notice that in every frame anchor is shining and in 1st frame it was missing
.
thanks GOD


RayKi wrote:Hello :)
I think I can help.

1-
For your first problem, I don't know if this is the better way to do this, but this is how I've done it in all my games so far.
Create a sprite to display the amount of bullets you want, and set the each frame with a number of bullets.
For instance, in the frame 0 you put nothing, at frame 1 you draw 1 bullet, at frame 2 you draw 2 bullets and so on. Then you create a variable to keep track of the amount of bullets the player still have, starting with 10 and decreasing every shot. And for last every time the player shoot you create the condition to decrease the value from this variable and at the same time set the frame of your sprite to the value of your variable. Therefore, if the variable is 10, the sprite frame will be 10 and it should display 10 bullets, after you shoot the variable should change to 9 and then the sprite frame should change to the value of the variable ( 9 ) displaying then... 9 bullets.

2-
This is quite simple actually, all you need to do is at the end of the game is check the remaining bullets o-o
You know the player starts with 10 bullets, so if he finishes the game with 9 this means the shot only once, give him 3 starts. Nothing much to explain here.

Hope I could help :D
Last edited by luckyrawatlucky on Sat Sep 12, 2015 7:05 am, edited 1 time in total.
Image
B
68
S
40
G
48
Posts: 680
Reputation: 34,076

Post » Fri Sep 11, 2015 11:52 am

Here my friend, see if this helps: https://dl.dropboxusercontent.com/u/183 ... ample.capx
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Fri Sep 11, 2015 12:04 pm

this is in c 212.2
and my is 200
i can't update because it gets error on update

if possible pls send in c 200
Image
B
68
S
40
G
48
Posts: 680
Reputation: 34,076

Post » Fri Sep 11, 2015 1:19 pm

luckyrawatlucky wrote:this is in c 212.2
and my is 200
i can't update because it gets error on update

if possible pls send in c 200


You really should update to at least the latest stable release.

What you are essentially asking is for users to install a very old version just so they can save it in that version for you.

Also - and I am certainly not accusing you of such - but people who refuse to update from old versions can be because they are using a pirated version.

Update, and if you have issues, we'll help you overcome them.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,497
Reputation: 60,280

Post » Sat Sep 12, 2015 7:40 am

1st is OK i have done it

2nd for Giving Star
condition end of layout is not working for me
but when i gave condition touch the target then stars are working

RayKi wrote:Hello :)
I think I can help.

1-
For your first problem, I don't know if this is the better way to do this, but this is how I've done it in all my games so far.
Create a sprite to display the amount of bullets you want, and set the each frame with a number of bullets.
For instance, in the frame 0 you put nothing, at frame 1 you draw 1 bullet, at frame 2 you draw 2 bullets and so on. Then you create a variable to keep track of the amount of bullets the player still have, starting with 10 and decreasing every shot. And for last every time the player shoot you create the condition to decrease the value from this variable and at the same time set the frame of your sprite to the value of your variable. Therefore, if the variable is 10, the sprite frame will be 10 and it should display 10 bullets, after you shoot the variable should change to 9 and then the sprite frame should change to the value of the variable ( 9 ) displaying then... 9 bullets.

2-
This is quite simple actually, all you need to do is at the end of the game is check the remaining bullets o-o
You know the player starts with 10 bullets, so if he finishes the game with 9 this means the shot only once, give him 3 starts. Nothing much to explain here.

Hope I could help :D
Image
B
68
S
40
G
48
Posts: 680
Reputation: 34,076


Return to How do I....?

Who is online

Users browsing this forum: minigame and 9 guests