shop - how to begin?

Get help using Construct 2

Post » Fri Sep 20, 2013 6:44 pm

Hi there,

im trying to build a shop with upgrades :https://www.dropbox.com/sh/tcjbi0rmc6f0ks6/lLqmgrMSzs
i want to add the following functionality: if you upgrade/buy, the next upgrade will cost more and so on...

anyone'v got an idea how to do this the easy way??

Thanks!
B
8
S
4
G
1
Posts: 191
Reputation: 1,873

Post » Sat Sep 21, 2013 1:04 am

give the items/upgrades a instance var Level and BasicCost

Events:
on shop load compare the levels

actions:
shop.upgrade1.level = player.upgrade1.level + 1
shop.upgrade1.cost = (shop.upgrade1.BasicCost * shop.upgrade1.level) / ((shop.upgrade1.level + 50) / 2)
B
19
S
6
G
3
Posts: 197
Reputation: 4,154

Post » Sat Sep 21, 2013 9:28 am

https://dl.dropboxusercontent.com/u/21151675/examples/examplepurchasincrease.capx
This is probably what you're looking for :)
You can also add cost.cost/6 for example for a smaller increase.
B
12
S
2
G
4
Posts: 78
Reputation: 3,332

Post » Sat Sep 21, 2013 10:45 am

[QUOTE=superwifibattler] https://dl.dropboxusercontent.com/u/21151675/examples/examplepurchasincrease.capx
This is probably what you're looking for :)
You can also add cost.cost/6 for example for a smaller increase. [/QUOTE]

Thanks mate i will check that out! Can you please help me with the following? I have a confirmation text which checks if you want to upgrade to level 1,2,3,: Are you sure you want to upgrade to level 1,2,3 etc. I have a variable healthlevel and have it set up like: set append text : healthlevel +1 but this also shows all numbers on further clicks like : are you sure you want to upgrade to level 123 ? :( any idea?
B
8
S
4
G
1
Posts: 191
Reputation: 1,873

Post » Sat Sep 21, 2013 10:46 am

[QUOTE=yonda] give the items/upgrades a instance var Level and BasicCost

Events:
on shop load compare the levels

actions:
shop.upgrade1.level = player.upgrade1.level + 1
shop.upgrade1.cost = (shop.upgrade1.BasicCost * shop.upgrade1.level) / ((shop.upgrade1.level + 50) / 2)[/QUOTE]

thanks yonda, i will have to check how to implement that in my mechanics. Maybe i have to start from scratch
B
8
S
4
G
1
Posts: 191
Reputation: 1,873

Post » Mon Sep 23, 2013 5:10 pm

First of all I can't see if you reply, so just putting a @superwifibattler would make my life much easier :) Thanks.
Also, I can help you a lot more if you could PM the .capx to me. Just doing a general.. thing is kinda hard since I don't know for sure what you're looking for. Rather, I have a general idea which could be totally wrong.

However I think this is pretty accurate, and I'm pretty sure this is what you're looking for... so here you go :)

https://dl.dropboxusercontent.com/u/21151675/examples/examplepurchaseincrease2.capx
B
12
S
2
G
4
Posts: 78
Reputation: 3,332

Post » Mon Sep 23, 2013 5:11 pm

Oh, nevermind I actually do see replies ^^ Sorry, my bad.
B
12
S
2
G
4
Posts: 78
Reputation: 3,332


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests