Need help with my "upgrading" event

Get help using Construct 2

Post » Sat Sep 17, 2016 6:48 pm

Message: Denmla can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
I'm new to C2 and i'm really pleased how this engine work but i have problem with making my "House upgrade" event.My event is shown on pictures down below and problem is that when i click "upgbutton" it should add just 1 floor to my building but it adds to (makes 2 sprites visible insted of 1 )
First picture : http://imgur.com/a/rrgJw
I set Global var stan1lvl (on English "house no. 1 level") to 0 and global var "ukupnepare" (on English "overallmoney") to 0. Then on layer start -> set "house no.1 level" to 1 ;
set "overallmoney" to 100 ;
Next one was :If "house no. 1 level" is = 1 then -> On mouse click object "stan1" (house1):
set "stan1upg" (house1upgbutton) visible;
set 'stan1cena" (house1price) visible
"house1upgbutton"(sprite) and "house1price"(text) are invisible at the beggining.
Second picture :http://imgur.com/a/izFg0
If ''overallmoney" >= 20 and "house no.1 level" = 1 then on Left click on "house1upgbutton":
Subtract 20 from "overallmoney"
Set text to "overallmoney"
"stan1drugisprat" (house 1 second floor) set to visible
"house no. 1 level" set to 2
set "house1price" to invisible
set "house1price" to "50$"
After that :
If "overallmoney" >= 50, "house no.1 level" = 2 then on left click on "upgbutton" :
subtract 50 from"overallmoney"
set text to "overallmoney"
"stan1trecisprat" (house 1 third floor) set to visible
set "house no.1 level" to 3
set "house1price" to invisible
set text to "house1price" to "100$"
set "upgbutton" to invisible (I forgot to add that when i took picture)
Picture 3 : http://imgur.com/a/0fGrv
You can see here what is what on my layout .
Hope you can understand it and sorry for long post !
B
4
Posts: 11
Reputation: 222

Post » Sat Sep 17, 2016 9:27 pm

You just asked like a million question. And i dont know where to start.

Plz allow me to do everything in just 10 events. Hopefully i show you a direction to go.
https://www.dropbox.com/s/upq8ikax57oyi ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat Sep 17, 2016 9:45 pm

Message: Denmla can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
99Instances2Go wrote:You just asked like a million question. And i dont know where to start.

Plz allow me to do everything in just 10 events. Hopefully i show you a direction to go.
https://www.dropbox.com/s/upq8ikax57oyi ... .capx?dl=0

Wow you made it look so easy! Thank you so much ! I'm having very hard time to understand what you did but i hope i'll get it sooner or later. If you have time i will be so greatfull if you could show me where i made mistake on my event sheet (i know it's hard to understand it but i did my best to simplify it as much as possible :mrgreen: )
B
4
Posts: 11
Reputation: 222

Post » Sat Sep 17, 2016 11:24 pm

I can not help you if you want to start learning from your events sheet. It is not using instances. It is not using instance variables. It is not using animation frames to present graphics. It does not pick instances. Even if you get that working (which is impossible) it will work for only 1 house, and you will have to start over anywayz. You dont have to accept my suggestion, but this i all i have for you: plz start over.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Sep 18, 2016 12:04 am

Denmla wrote:I'm new to C2 and i'm really pleased how this engine work but i have problem with making my "House upgrade" event.My event is shown on pictures down below and problem is that when i click "upgbutton" it should add just 1 floor to my building but it adds to (makes 2 sprites visible insted of 1 )
First picture : http://imgur.com/a/rrgJw
I set Global var stan1lvl (on English "house no. 1 level") to 0 and global var "ukupnepare" (on English "overallmoney") to 0. Then on layer start -> set "house no.1 level" to 1 ;
set "overallmoney" to 100 ;
Next one was :If "house no. 1 level" is = 1 then -> On mouse click object "stan1" (house1):
set "stan1upg" (house1upgbutton) visible;
set 'stan1cena" (house1price) visible
"house1upgbutton"(sprite) and "house1price"(text) are invisible at the beggining.
Second picture :http://imgur.com/a/izFg0
If ''overallmoney" >= 20 and "house no.1 level" = 1 then on Left click on "house1upgbutton":
Subtract 20 from "overallmoney"
Set text to "overallmoney"
"stan1drugisprat" (house 1 second floor) set to visible
"house no. 1 level" set to 2
set "house1price" to invisible
set "house1price" to "50$"
After that :
If "overallmoney" >= 50, "house no.1 level" = 2 then on left click on "upgbutton" :
subtract 50 from"overallmoney"
set text to "overallmoney"
"stan1trecisprat" (house 1 third floor) set to visible
set "house no.1 level" to 3
set "house1price" to invisible
set text to "house1price" to "100$"
set "upgbutton" to invisible (I forgot to add that when i took picture)
Picture 3 : http://imgur.com/a/0fGrv
You can see here what is what on my layout .
Hope you can understand it and sorry for long post !


You mean like this? :mrgreen:

https://www.dropbox.com/s/ecy2eey7o40i0 ... .capx?dl=0
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Sun Sep 18, 2016 8:29 am

99Instances2Go wrote:I can not help you if you want to start learning from your events sheet. It is not using instances. It is not using instance variables. It is not using animation frames to present graphics. It does not pick instances. Even if you get that working (which is impossible) it will work for only 1 house, and you will have to start over anywayz. You dont have to accept my suggestion, but this i all i have for you: plz start over.

Yup , if i get this working it will be just for 1 house i see that now so it will be so hard to do that for multiple of them and I realized that if i want to move forward i need to start learning more stuff from others and not to just stick with my "way". Thanks for replaying ! :)
B
4
Posts: 11
Reputation: 222

Post » Sun Sep 18, 2016 8:30 am

Message: Denmla can only post plain text URLS until they have 500 rep. 3 URLS modified. Why?
Gmoney wrote:
Denmla wrote:I'm new to C2 and i'm really pleased how this engine work but i have problem with making my "House upgrade" event.My event is shown on pictures down below and problem is that when i click "upgbutton" it should add just 1 floor to my building but it adds to (makes 2 sprites visible insted of 1 )
First picture : http://imgur.com/a/rrgJw
I set Global var stan1lvl (on English "house no. 1 level") to 0 and global var "ukupnepare" (on English "overallmoney") to 0. Then on layer start -> set "house no.1 level" to 1 ;
set "overallmoney" to 100 ;
Next one was :If "house no. 1 level" is = 1 then -> On mouse click object "stan1" (house1):
set "stan1upg" (house1upgbutton) visible;
set 'stan1cena" (house1price) visible
"house1upgbutton"(sprite) and "house1price"(text) are invisible at the beggining.
Second picture :http://imgur.com/a/izFg0
If ''overallmoney" >= 20 and "house no.1 level" = 1 then on Left click on "house1upgbutton":
Subtract 20 from "overallmoney"
Set text to "overallmoney"
"stan1drugisprat" (house 1 second floor) set to visible
"house no. 1 level" set to 2
set "house1price" to invisible
set "house1price" to "50$"
After that :
If "overallmoney" >= 50, "house no.1 level" = 2 then on left click on "upgbutton" :
subtract 50 from"overallmoney"
set text to "overallmoney"
"stan1trecisprat" (house 1 third floor) set to visible
set "house no.1 level" to 3
set "house1price" to invisible
set text to "house1price" to "100$"
set "upgbutton" to invisible (I forgot to add that when i took picture)
Picture 3 : http://imgur.com/a/0fGrv
You can see here what is what on my layout .
Hope you can understand it and sorry for long post !


You mean like this? :mrgreen:

https://www.dropbox.com/s/ecy2eey7o40i0 ... .capx?dl=0

Yup that's exactly what i need. Thanks ! :D
B
4
Posts: 11
Reputation: 222

Post » Sun Sep 18, 2016 11:00 am

For some reason i can't get this to work for me Gmoney,did everything like you but for some reason i can go to negative money and my animationes are playing 2 (animation 'h1l2' and 'h1l3') at once. Image This is my animation panel, Image My event sheet
B
4
Posts: 11
Reputation: 222

Post » Sun Sep 18, 2016 6:54 pm

B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Sun Sep 18, 2016 8:34 pm

Message: Denmla can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Gmoney wrote:Try this method. It will work. :mrgreen:

https://www.dropbox.com/s/mxicwb1fnk9ld ... .capx?dl=0

This one works just fine , thanks!
B
4
Posts: 11
Reputation: 222

Next

Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo, dop2000, jsutton, TRMG and 22 guests