Money system and end level.

For questions about using Classic.

Post » Mon Oct 20, 2008 4:20 pm

I want something like so.

When 'rock' is clicked, compare value 'money' greater or equal 100.
If value 'money' greater or equal 100, subtract 100 from value 'money', move 'rock' to 'inventory'.
If value 'money' is not greater or equal 100, go to layout #.

In all, i want it to buy the rock and put it into the inventory, or if it can't, go to a "sorry, can't buy" screen.
I can't seem to get the thing to compare money when clicked, which means i cant go on with the rest of it.

Either way, this system is awesome, even easier than game maker, and i have absolutely no scripting background (that may be part of the trouble)

Any help is appreciated!
B
2
G
4
Posts: 12
Reputation: 1,074

Post » Mon Oct 20, 2008 4:39 pm

http://www.mediafire.com/?e2n2zmuzqzj

Pretty sketchy but you get the idea.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Tue Oct 21, 2008 2:19 am

Thanks alot, i didn't know that you could have two "ifs" in it.
That really helps me in general =)

One thing though. I want a single variable 'Money' to stay constant from the game screen untill the shop screen, and still stay constant from the shop screen untill the game screen again!
At the moment it's like this. I kill all the monsters and have 150 money, then i get moved on to the shop screen. In the shop screen I have 0 money =(
What I tried is using my main character with a private variable in both screens so i would have that same variable, but it didn't work.


How do i do that? And also, how do i upload my game onto these boards?
B
2
G
4
Posts: 12
Reputation: 1,074

Post » Tue Oct 21, 2008 2:42 am

You can use a global variable for the money. Those carry over to all layouts. To add one, go to the "Project" tab on the right and click on your application. Then, on the left, scroll down until you see the section called "Global Variables". You can add them from there.

And about uploading, you'll have to upoad your game off site and then link to it. I suggest Willhostforfood.com. It's free and offers direct linking to the files.

Hope that helps. :)
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Tue Oct 21, 2008 11:20 am

Wow, that helped indeed!
I got alot from this thread so far, multiple conditions, global variables =)

Uhm.. sorry to ask for yet ANOTHER thing, but how in the world do you make an inventory!! One which changes the thing the person is holding (ect)
B
2
G
4
Posts: 12
Reputation: 1,074

Post » Tue Oct 21, 2008 11:21 am

Will your inventory contain many items, like an RPG style inventory? Or will it be a one/two item inventory system?

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Wed Oct 22, 2008 1:36 am

It will contain many items, mostly weapons and armors.

Also, i'm trying to make it say "your too poor" if you click on something when your money is too low, but what it does is compare value 'money' after you click on it.

So, i'll have $150, and i buy the rock for $100, then it will say that i cant afford it (because my money is NOW $50). I only want it to say that i can't afford it if my money is too low (when i click on it)
B
2
G
4
Posts: 12
Reputation: 1,074

Post » Wed Oct 22, 2008 3:24 am

[quote="mikybee93":2ifd0uqj]...i'm trying to make it say "your too poor" if you click on something when your money is too low...[/quote:2ifd0uqj]

PLEASE! Make that "You're too poor."
B
2
S
1
G
4
Posts: 92
Reputation: 1,384

Post » Wed Oct 22, 2008 10:54 am

Yeah yeah, you ARE is you're and possessive is your. You understood what I meant didn't you?
And please don't yell the word "please".
B
2
G
4
Posts: 12
Reputation: 1,074

Post » Wed Oct 22, 2008 12:04 pm

lol... grammar... not my strong point at times either.

Anyway, a multiple object inventory system is usually a tricky thing to make. I have one more question... how many types of items are you going to have in the game? Only like 10-15 items maybe? Or hundreds?

The reason I ask is there is a really easy way to make an inventory if you are only going to have a certain amount of items.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests