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 !