SputnikCZ's Forum Posts

  • Oy lads

    I'm trying to learn in the C2 for some time (Second year started) and due to lack of time it goes so slow. Even when I learned how to create a functions for menu, changing the needed sprites etc I have a question about the Layers and Layouts.

    When I'm working on web based "Sci-Fi Mafia" game with a lot of sheets (Each sheet contains only what it needs - "settings" for settings, "building sheet" for buildings only, etc) and even when I have only 3 Layouts now - "Home page", "Login page" and "Game", in the "Game" layout I have a lot of layers (Almost 12) and here is my question:

    Is it better to create 1 layout with 2 layers for the Background and GUI and each layer separate into the layout or leave it how it is? I'm more worried about the effect on the performance of the game. Even when there is not even one single animation yet (It's more text based game with single sprites only) I'll add something later.

    Well, when I'm here already I'd like to ask something else. I never worked with the "Multiplayer" functions yet and I'm little bit confused of "How to save players' data" into the game (When he is logged on and doing something) and then how to synchronize it with the cloud storage etc... If you have any ideas, shoot it at me!

    Cheers guys for any kind of help. If you need more info about what I'm asking for, I'm here almost every day (Still learning and reading).

  • I will try do my best. In few days I will post my work. Now I have some major problem with layer visibility. :/

  • Hello guys.

    I'm working some time on a project and right now I get stuck. We figured out how to set building array bassed on sprite background (squares 10pX10p)and how to create simple object with the "core" square and another squares around.

    Here's my question - How to "save" this "builded module" into the array or into other thing as sprite etc.

    1st Phase is create the spaceship design. Than Save

    2nd Phase is put allowed modules onto the design

    3rd phase - save the setted spaceship into the "game" and let the game manipulate with it (In battle system, navigation - there is transition between layouts)

    This is not moveable sprite. Who want's to discuss something about it, feel free to write me.

    Cheers,

    Rob

  • Debug showed me that button was clicked with one another what was on same layer. It's repaired. I don't know why I didn't saw it before. :/

    Thanks pal.

  • Pic1

    On this picture, you can see how those comands are set on buttons (Sprites) for Corporation.

    Pic2

    This picture shows you how is Pirate section set. For compare.

    Pic3

    On third and last Picture you can see button variable..

    IDK why it not works. Any ideas?

  • Yop. I will post a screen after my bath.

  • Good morning/day guys!

    Well, after the latest update of C2, I've got problem with my buttons in some places of my game.

    Let me explain:

    I have few Layouts, one of them is GameLayout. There is more than 13 layers. Layer Communication is the place with problem. (Sorry for long info )

    Sprite ComBT and ComBTTX is like Communications menu. With instace Variable "Usage". Fleet have "FLEET" etc. and after last update I found this problem.

    I just copy every line from "FLEET" in gamesheet and paste it for new IV - "CORP". Then I changed the text included in actions and conditions and guess what? Still not working. I'm too lazy to printscreen my C2 with this, but if you demand I will do it for you. :3

    Cheers guys

  • I'm using those positions :

    1-Goldmine

    2-Lumbermill

    3-Laboratory

    11-Soldier1

    12-Soldier2

    13-Soldier3

    21-GovBuilding1

    22-Gov2

    23-Gov3

    31-Research1

    32-Res2

    33-Res3

    Etc...

    Those array positions are good for me and I know where is what. I just had question about adding resources per TickForProd (2 seconds) and if is possible to create subtract function what will subtract from current production and from stored resources.

  • Well, I use XYZ array because of this:

    (1,0,0) means - 1 for Gold, 0 for level, 0 for info for production.

    As example:

    tokenat(Array.At(1,GoldUp,0),0,",")

    tokenat(Array.At(1,GoldUp,0),1,",")

    Is for Goldmine, depending on level cost - Like: Build GOLDMINE lvl 1, for 150 gold, 150 lumber.

    And those zeros in (1,GoldUP,0) are for production per TickForProd - like 50 gold per 2s.

    That's why I use Array.

  • After I arrive from work I will explain

  • Hello Constructniacs!

    As I work on my "Country Management" I have few issues with my projecct wwhat I'm solving right now. But there is one what I can't solve y myself and I'd like to hear some opinions of yours!

    I'm using functions for buildings (Array XYZ for building costs and production per 2s) but I use also this array for Military layout (Soldier price, -gold per 2s, -food per 2s).

    When I had only buildings, everything was fine. My GoldTX showed me CurrentGold & " Gold" & newline & array.At(1,GoldUp,1) & " Gold each " & TickForProd & " seconds"

    When I create new conditions for Soldiers - 1 soldier cost 2 people, 20 gold and every TickForProd cost 20g and 15 food, my GoldTX show me NaN Gold and NaN food........ Any idea how to solve this?

    Army script is now just this: System -> Army > 0 ->> Subtrac from tokenat(array.At(11,0,1+Army1),1,",") from CurrentGold ; Subtract from tokenat(Array.At(11,0,1),2,",") from Food

  • How the hell I put there fade?!!!!! Thank you so much for that. And those buttons - did they work? Because they dont work for me......

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • GDrive DL

    Take it!

  • I just think about setting a group (Layer Interface is visible-> Set Group Buttons active 'Buttons group=Button1-6 is visible')

    What do you think?

  • When I come from work I'll post a link