Picky, Picky

For questions about using Classic.

Post » Wed Jan 13, 2010 10:07 pm

As the start of my game I want to have a choice between 3 cars with a text expiation about each.

In other programming languages I would have a radio button that could only pick one and then a play button at the bottom of the form.

What wold be the best way to select the car in Construct?
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Wed Jan 13, 2010 10:35 pm

There really isn't a "best way." There are lots of different ways you could have the player select a car. I would stay away from the button objects and other windows controls, though. Make your own buttons out of sprites.

Anyway, if it were me I'd make three sprites, one for each kind of car. When you click on a sprite, it sets a global variable stating which kind of car you picked. Then you can go to the next layout and spawn whatever kind of car it was based on that global variable.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Jan 14, 2010 12:22 am

Is there a simple example of of a front end to make selections?
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Thu Jan 14, 2010 4:53 am

Sure.

http://dl.dropbox.com/u/529356/clickabox.cap

If you want a more in-depth tutorial on how to make your own GUI buttons and stuff, check out my Custom UI Elements tutorial:

viewtopic.php?f=8&t=3809
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Jan 14, 2010 5:11 am

I am getting a run time error with your clickbox.cap Can you check it and re submit please?

Looking for your Custom UI Elements tutorial: too
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Thu Jan 14, 2010 5:20 am

It's made in the latest version, v0.99.72. Get it here:

viewtopic.php?f=2&t=5363

Whenever I make an example .cap for somebody I'm just going to assume they have the latest version. It saves me time and energy wondering what version they might be using.

Anyway, the .cap is nothing special. You click on a sprite, it changes a global variable. Should be pretty self-explanatory.

Though my example does use a family for the three different sprites in order to cut down on the number of events.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Jan 14, 2010 5:41 am

Thank you deadeye I am on v0.99.72 now and your app works. Going to check it out.
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Thu Jan 14, 2010 5:46 am

WOW layouts Changed everything! They are like the rooms on GameMaker.

Thanks deadeye you example really helped and I suggest you put it up on the tutorial page for new users, since it shows so much that in really not explained.

BTW I can not tutorial on how to make your own GUI buttons
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Thu Jan 14, 2010 11:11 am

Thanks. It's pretty basic, though. I don't think it needs it's own tutorial thread. Layouts are rather a fundamental aspect of Construct.

[quote="Guyon":3bvs30dz]BTW I can not tutorial on how to make your own GUI buttons[/quote:3bvs30dz]

I don't know what you mean. You can't... what? Download it? Open it? Understand it? Read it? Help me out, I need a verb here :P
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Jan 14, 2010 11:32 am

Well layouts were not as obvious as you might think for a new user. They are now. that I am aware of them now.
Thanks for all you help I will be done with my beginner game soon now.
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests