dop2000's Forum Posts

  • If the purchase is approved, but "On purchase success" event is not triggered, I suggest you file a bug report:

    github.com/Scirra/Construct-3-bugs/issues

  • But I noticed it gives a random RBG value.

    It is not random! It's RGB value from the pixel in the center. It may not be accurate because of the camera noise etc. So if you need better detection, you have to calculate an average color for an area of pixels.

    You can take snapshots constantly, but you still have to wait for snapshot to finish. Saving a snapshot is not a fast operation, especially on large camera image. So you may not be able to detect moving objects with this method.

    And if you need to detect a red object anywhere on the screen, this will be nearly impossible to make with events. I suggest you look for some JS library.

  • Here is a demo, one pixel is read from the center of the image:

    dropbox.com/s/oduicvl97l4v0le/Cameratest.c3p

  • Have you seen the official template for this?

    https://editor.construct.net/#open=camera-average-color

  • jatin1726 Check out this Color Picker template:

    howtoconstructdemos.com/hsv-color-picker-tool-c3p

    If this is not what you need, please give more information. Are you trying to read pixel color from a sprite?

  • MyText set text to "hello" & newline & "construct3!"

    But you can't use this in variables, arrays etc. Here is how I usually do this:

    Variable s = "Hello^construct3!"
    MyText set text to replace(s, "^", newline)
    
  • My guess is that when the purchase is finally approved, "On purchase success" will be triggered in the app. Even if the app is closed, next time you open it, this event should fire. So you should include the event sheet with this event to all your layouts just in case.

    I may be wrong, you need to test this.

  • Playbacktime should be in seconds, and it will almost never be equal to exactly 5. So you should use this:

    Audio.Playbacktime("Music")>=5
    Trigger once
    	Audio play "Music"
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I understand that you need a small overlap. But I think it's easier to do in a sound editor. Mix the beginning notes into the end of the track, and the ending notes into the beginning. And crop it so that it plays seamlessly.

    If you want to do it in Construct, you'll have to play the first copy of the song, and then compare AudioPlaybacktime expression on every tick. When it's almost the end of the song, start the second playback and fade out the first.. I don't know how accurate this will be.

  • If you remove any silence from the beginning and the end of the audio file and play it with Loop=on setting, it should loop seamlessly.

  • With web export you can save to local storage or to some cloud storage. You can also save to a file, but players will be shown "Save as" dialogue.

  • Well, it's just an assumption, I don't know your game. If both dimensions mostly share the same objects and images, then it should be fine.

  • Both methods have their disadvantages.

    You can keep both dimensions in the same layout, in many games the performance impact will be minimal. However, you will have to keep these dimensions separated, for example on different layers. Also, you will need to disable everything for inactive dimension - collisions, solids, stop enemies etc. And you will have to remember filtering out inactive dimension in all events. For example, when picking enemies - only pick instances on a particular layer.

    With switching layouts there is a problem of syncing. You'll need to give Persist behavior to all changeable objects, remember player's position etc. Also, if you have a lot of graphics, there will be a delay when switching to another layout, which you'll have to mask with some transition effect like fade in/ fade out.

  • You do not have permission to view this post

  • In nwjs you can write/read files silently. So you can save games to a folder, for example NWjs.UserFolder & "YourAppName\save01.txt"

    If you're currently saving lots of different keys with Local Storage, it would be easier to put these values into an array or a dictionary, and write Array.AsJSON to the save file.