How do I Addition score from different layout?

Get help using Construct 2

Post » Thu Feb 11, 2016 12:13 pm

Carbincopy wrote:you would have to have an event sheet like score where layout 1 and 2 also call event sheet score also.

so it would be an external event sheet for global's and stuff reused through out the whole game.

layout1 = event sheet 1
layout2 = event sheet 2

on event sheet 1 and 2 include event sheet (score)

I have 3 event sheets for the 3 layouts and a ""score"" global variable copied on each event sheet but it doesn't work. Can you please make an example very simple project? Help Please
B
8
S
4
Posts: 17
Reputation: 792

Post » Thu Feb 11, 2016 4:38 pm

You could just post the .capx iam pretty sure its just a bug.
B
7
S
2
Posts: 56
Reputation: 583

Post » Thu Feb 11, 2016 5:38 pm

Here is a demo of what I said to do.
https://www.scirra.com/arcade/tutorial- ... topic-5495

if text score on screen set text = Score

updated demo as global's transfer between layouts and local's do not.
see demo for more details.

so if you need to have local's for each layout they need to be set on scoring event sheet
then on layout total / finish pull local scores then add to total score.
like seen in galaga where to total ships destroyed = total score.


manran wrote:I have 3 event sheets for the 3 layouts and a ""score"" global variable copied on each event sheet but it doesn't work. Can you please make an example very simple project? Help Please
only have to set global on one event sheet to call on all layouts


Edit1: Updated demo to add total scores both for global and local.


Edit2: Ok! I have not made the mod for this part, But you could also use something like subtract 1 from score lv1 add to total score if lv1 score =0 do event subtract 1 from score lv2 add to total score. if lv2 score = 0 do event subtract 1 from lv3 score add 1 to total score.

Thus you would see text scores for each displayed score and total = 0
Then as each score zeros out and add to total
The next would start to zero out and add to total
for a more cool total effect.


Edit3 : Ok! I added a trigger button to total all scores and subtract from other scores.


Edit4: Ok! I went as far as to make a video talking about this topic and added it to my collection of video tutorials. see them here. my-construct-2-video-tutorials_t168236
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Fri Feb 12, 2016 10:32 am

@Carbincopy: Cool job (although it is a bit of a monologue you have there), but please next time, do edit your post yourself instead of multiposting in a row.
Bumps of 24 hours are the only one accepted.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
276
S
103
G
84
Posts: 7,292
Reputation: 83,106

Post » Fri Feb 12, 2016 3:37 pm

Kyatric wrote:@Carbincopy: Cool job (although it is a bit of a monologue you have there), but please next time, do edit your post yourself instead of multiposting in a row.
Bumps of 24 hours are the only one accepted.


Sorry about that. Just had way to much fun with this topic.
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Sat Feb 13, 2016 6:40 pm

Message: manran can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
Carbincopy wrote:Here is a demo of what I said to do.
https://www.scirra.com/arcade/tutorial- ... topic-5495

if text score on screen set text = Score

updated demo as global's transfer between layouts and local's do not.
see demo for more details.

so if you need to have local's for each layout they need to be set on scoring event sheet
then on layout total / finish pull local scores then add to total score.
like seen in galaga where to total ships destroyed = total score.


manran wrote:I have 3 event sheets for the 3 layouts and a ""score"" global variable copied on each event sheet but it doesn't work. Can you please make an example very simple project? Help Please
only have to set global on one event sheet to call on all layouts


Edit1: Updated demo to add total scores both for global and local.


Edit2: Ok! I have not made the mod for this part, But you could also use something like subtract 1 from score lv1 add to total score if lv1 score =0 do event subtract 1 from score lv2 add to total score. if lv2 score = 0 do event subtract 1 from lv3 score add 1 to total score.

Thus you would see text scores for each displayed score and total = 0
Then as each score zeros out and add to total
The next would start to zero out and add to total
for a more cool total effect.


Edit3 : Ok! I added a trigger button to total all scores and subtract from other scores.


Edit4: Ok! I went as far as to make a video talking about this topic and added it to my collection of video tutorials. see them here. my-construct-2-video-tutorials_t168236


Thanks a lot man for your devotion, i will work on it as soon as i have the time to check the project as i have to finish some motion design project for now . I will post feedback here soon.
B
8
S
4
Posts: 17
Reputation: 792

Post » Sat Feb 27, 2016 12:13 pm

Message: imczx can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I'm having trouble making score screen. I share with you my example. Can you give me some advice. I do not want to switch to a new layout for the score screen. I want a small window open in the game layout. However, i want to give 3 stars, 2,stars but it is a problem . when i complate level in first shoot it is 3 star. Complate second shoot it is 2 star third or more try it is 1 star.


her is the link .. https://goo.gl/B5csdx
B
6
S
2
G
1
Posts: 17
Reputation: 573

Post » Sat Feb 27, 2016 1:17 pm

Make a new variable called "totalscore" and make a totalscore.text object that will display the Total Score the player has gotten from the 3 levels, then do this in the Event Sheet...

every tick > totalscore.text > Set text to: "Total Score: "&score1+score2+score3

Should work, it doesn't matter where your events are, or where your variables are.... Hope that's helped.
B
14
S
1
Posts: 65
Reputation: 732

Previous

Return to How do I....?

Who is online

Users browsing this forum: CJacobsSA, R0J0hound and 6 guests