Hi, I'm New, I need a help for "score" variable

For questions about using Classic.

Post » Sun May 08, 2011 6:05 am

Hello i'm new here, i'm a new indie game developer :D. This is my first game is inspired by Strikers 1945 and Aero Fighters.

I recreated a game from a tutorial called "Create_A_Vertical_Shooter_In_Construct.zip" there a version like part 1 but i couldn't find part 2.

I made a "Text" as score and i added a private variable "score", then i added an event as "Always" and a action "Text: Set text to Text .Value('score')

finally, a collision between a bullet and an enemy, this action was Text: Add 100 to 'score' but it didn't work and i wasted like 4 hours how to fix it.

I uploaded my source if you can help me.

[url:bhni0i8u]http://cl.ly/2O2i421x1Z3T1U3P3y0v/redfalcon.zip[/url:bhni0i8u]

Thanks in advance!
(My english is not good :P)
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Sun May 08, 2011 6:45 am

Try this:


Make a global variable "score" (click on the project tab, and right-click on "Global Variables" to add one)

Event 1:
Set text to global variable value, "score"

When bullet collides with enemy-
add 100 to global variable "score"


I did that, and it worked like a charm.
Check out my VGM on my soundcloud page!
Video-Game Music: E.C.2151
B
7
S
2
G
2
Posts: 193
Reputation: 1,561

Post » Sun May 08, 2011 7:40 am

Hmm... look this:



After i created a "score" in global variables folder in project section.


I removed Text.Value('score') and i added "score" in Event 1.


Also When bullet collides with enemy- add 100 to global variable "score". But a there Private Variable option, it is from "Text" object with a private variable with 'score'...

I don't understand... :(
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Sun May 08, 2011 8:39 am

Instead of putting "score" in Event 1, place global('score').
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Sun May 08, 2011 8:57 am

[quote="Arsonide":1fob04sm]Instead of putting "score" in Event 1, place global('score').[/quote:1fob04sm]

I already did it some minutes ago but didn't work... maybe you will look this:
http://cl.ly/1y2c1I2T1r2f1u3q2z1p/redfalcon.zip
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Sun May 08, 2011 8:58 am

Here is the fixed cap.Note the cap was made with Construct classic R1 ,Which is the latest version of Construct.Your Score Variable was incorrect at the event's so i created a new text object for the scoring.
[url:3ew4aej1]http://dl.dropbox.com/u/7658043/RedfalconFixedScore.cap[/url:3ew4aej1]

Edit : Here is the fixed cap that's compatible with old version of Construct
[url:3ew4aej1]http://dl.dropbox.com/u/7658043/RedfalconFixedoldcap.cap[/url:3ew4aej1]
B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Post » Sun May 08, 2011 9:17 am

[quote="DravenX":1hx1f58z]Here is the fixed cap.Note the cap was made with Construct classic R1 ,Which is the latest version of Construct.Your Score Variable was incorrect at the event's so i created a new text object for the scoring.
[url:1hx1f58z]http://dl.dropbox.com/u/7658043/RedfalconFixedScore.cap[/url:1hx1f58z]

Edit : Here is the fixed cap that's compatible with old version of Construct
[url:1hx1f58z]http://dl.dropbox.com/u/7658043/RedfalconFixedoldcap.cap[/url:1hx1f58z][/quote:1hx1f58z]

I was going to ask you about the version... actually you inmediatly edited this :mrgreen: awesome it worked very well, thanks a lot and i add you in my credit! (also 2 another guys who tried to help me.)

There a little question...

I would like to know where the tutorial in following steps that i can learn:
-Mini Boss and Boss
-Life Counter
-Power Up Weapon
-Animated Vertical Scroll
-Game Over Screen

Or if they don't exist, i should to experiment the functions.

Thanks in advance.
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Sun May 08, 2011 9:24 am

Here is an example i made a while ago with a scrolling background.

http://dl.dropbox.com/u/7658043/scrollingback.cap
B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Post » Sun May 08, 2011 9:29 am

[quote="DravenX":feb6ogt1]Here is an example i made a while ago with a scrolling background.

http://dl.dropbox.com/u/7658043/scrollingback.cap[/quote:feb6ogt1]

Nice! :)
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Sun May 08, 2011 10:04 am

Here is an example of the life counter or health bar along with a Game Over screen.Move the arrow over the blue box to lose health.
[url:4q2wmt65]http://dl.dropbox.com/u/7658043/HealthbarGameOverScreen.cap[/url:4q2wmt65]

As for mini bosses and final bosses, Depends on what you want the bosses to do or how they must behave.
B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests