Need help with my "upgrading" event

0 favourites
  • 11 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • 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 : 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 : 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 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

  • 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 <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /> )

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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? <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

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

  • 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 !

  • > 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 : 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 : 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? <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" />

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

    Yup that's exactly what i need. Thanks ! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" />

  • 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.

    This is my animation panel,

    My event sheet

  • Try this method. It will work. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

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

  • Try this method. It will work. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" />

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

    This one works just fine , thanks!

  • > Try this method. It will work. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    >

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

    >

    This one works just fine , thanks!

    You're welcome, Denmla. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)