randomly's Forum Posts

  • Well, I don't think your project actually needs 9.405 different Sprites....

    Please tell us what all those tiles are there for, so we can fit the solution to your project.

    Usually, there is no need for that many Sprites.

  • What you could do, is to wrap with NW.js and to insert an action "Run file".

    This file would then be a .bat containing the following actions:

    wmic os get Caption /value > [filedirectory]\filename.txt[/code:392h7voe]
    (Add ",CSDVersion" after Caption to get Servicepack version as well)
    
    The .bat file will save the Windows Version with "Caption=[Windows Version]" to a txt-file in the directory of your choice (make sure to have the rights to write files there).
    
    You would then have to load the txt via the "AJAX" object action (preferrably "request project file") and parse the contents to a variable for example.
    
    Yep, quite complicated.
    But if it's worth it for you... ;)
  • Thanks for the answer.

    So you mean that for the hue I should create a water layer or Sprite which is on top of everything and then just...erase something?

    Should I use a canvas or how am I supposed to achieve that?

  • The problem with your setup is the second pick condition.

    The first pick condition

    Pick Sprite where Sprite.ID = loopindex("a2")[/code:1rx0w2jq] works fine and selects the corresponding Sprite.
    
    The thing is that the second pick condition [code:1rx0w2jq]Pick SpriteFM (family) where SpriteFM.ID = loopindex("a2")+1[/code:1rx0w2jq] from the previously picked objects picks.
    This means that the first pick reduces the picked objects to one Sprite that has the right ID.
    The second pick condition picks the Sprite that has a different ID.
    Since there is no Sprite which has two different IDs at the same time, there isn't any Sprite picked and that's why the text doesn't change.
    
    Now to fix this, you could either just disable the second pick condition
    or
    you could add a second text object, then move the second pick condition to be checked after the first one (as sub-event to the loop) but not as a sub-event of the first pick. You would then change the second text to the second Sprite.ID.
    
    Hope I could help.
  • Whoah man, your post is really hard to understand.

    I don't really seem to understand what you are trying to achieve.

    I guess you want the Space Bar to act as a button for everything? So that it controls every single aspect of menus?

    If that is the case, I don't see how that would be possible...if there are multiple possibilities for the user to choose from, how is the program supposed to know which one of those the user wants to pick when pressing the Space Bar?

    Could you please clarify your intentions?

  • I'd be happy to help you, but you need to provide us with a .capx not a .caproj

    You can do so by going to "file" -> "Save as" -> Select .capx as filetype -> save -> upload -> share link

  • Hey everyone,

    I'm currently working on a submarine game and I'm troubling with blend modes/WebGL effects.

    What I want to do is the following:

    • A submarine in dark water (not black, more blueish)
    • Submarine's light lights up the dark water and a bit of the submarine too
    • Everything else which is not in the torchlight area should be not visible or very dark

    (Let the details be my problem, I just want the general setup)

    Kinda like this: https://goo.gl/UP3cRx

    I figured I'd create a Sprite for the light, being a gradient going from white to transparent.

    I tried every possible combination of blending modes, including the ones in the "effects" property.

    I tried every possible Z order.

    There must be a way, probably a very simple way, a combination of effects I missed.

    Any help is greatly appreciated, thanks.

    [EDIT]

    I maybe found a way to do it. Maybe.

    It just ignores colors of objects on the main layer...

    Link to the capx: https://www.dropbox.com/s/4basmw18nzmcbb6/SubLight.capx?dl=1

  • First question: what is your target platform? Browser (mouse)? Or mobile (touch)?

    Second question: what do you trouble with? Can't be everything. The start? How to keep the ball in the air? How to do the ball's movement?

    For future posts, please provide more information.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, actually, that depends on what you want to achieve with your website?

    Which look are you pursuing?

    To me, it looks...digital? And flat & simple.

    If that is what you want to achieve, you succeeded.

    The simplicity of the page helps keeping a nice overview. Though the page looks complex, it doesn't "overflow" your senses.

    I don't know what the BG image is, but it looks interesting and I like the fact that it moves.

    Would be awesome if it was interactive.

    More notes:

    • it is a bit irritating (at least with a slow internet connection, such as mine) that there is no loading screen (at least I haven't seen one). There's just a black canvas for some seconds. Probably not an issue for ppl with faster internet.
    • what's the black square next to the menu?

    But to conclude, yeah, I like the style. Suits the title of the page.

    There could be more color though.

  • Sorry I can't open your file since it's saved in a more current version of C2 than mine.

    I'm in a slow-internet location atm that's why I can't update.

    I'll just try to solve your problem without the capx.

    Moving a Sprite/Tile with the bullet behaviour isn't that much of a problem.. (if I understand correctly what you are trying to achieve).

    If you simply want the Sprite to move at a constant speed, you can go with the action "Sprite: Bullet - set speed to [whatever speed you want].

    If you want to accelerate it, set the initial speed to whatever you like and then set the acceleration to a positive value.

    The higher the acceleration, the faster the speed increases.

    Give the Sprite the behaviour "Wrap" and that's it.

  • Sorry, but what are you trying to do?

    Are you trying to put a selectable item in a listbox?

    And if yes, what kind of "wrapping" are you pursuing to make the text fit in there?

    Are you looking for compression? Or any way to parse and shorten the text?

  • Well what you did is actually the simplest option you can go with.

    But it doesn't work if there are more than 20, say for example 40 Red Boxes....but if that's not needed in you project, no problem with your solution.

    What I don't understand though, is:

    1) why does your Redcount variable go up when one instance is destroyed? Didn't you want to create one blue box for every 20 red created?

    2) Why don't you just use RedBox.count? That would make the variable redundant.

    And if you might explain your second issue (with the random stuff) again, more detailed (or create a new thread for it), I'm sure I can help you with that too.

  • Well, you could go with the "Take snapshot of canvas" system action.

    After that, you need to add an event "On canvas snapshot".

    The image is then stored under the URL "CanvasSnapshot" and you can do with it whatever you want.

    (Adapted from the C2 example "Taking Screenshots", located in [C2InstallDirectory]\examples\, you can take a look at that if you don't understand)

  • You could do the following:

    Repeat RedBox.count times
          (if) loopindex % 20 = 0
                 (then) Create object BlueBox[/code:2omopuix]
    
    This procedure would be repeated as many times as there are Red Boxes.
    When the division [i]loopindex / 20[/i] returns a number without any digits behind the point (the loopindex is dividable by 20), a Blue Box is being created.
    
    This is the way without a variable.
    
    There also is a way with a variable, but I guess this one is sufficient for the moment.
  • Well first of all, a .capx would be useful.

    Since every project is unique, I can't tell much from just those information...

    The compilation process is unlikely to be the problem.

    But since the debugging view sometimes is a bit slower compared to the normal preview (at least on my old Laptop), that could be an issue.

    But to tell more, I'd need the .capx of your project.