dop2000's Forum Posts

  • Almost. You need to remove the "Else" part. Reset the boolean variable to 0 at the beginning of the function (or you can use local variable by the way). And only set it to 1 when array contains value, don't reset it to 0 when it doesn't.

  • I updated my example, re-download it.

    You can use Tween instead of Sine. Move cards sideways with Tween. On tween end, change their z-order, then move back to the deck.

  • It's difficult to figure out by your screenshots, but one mistake I noticed is that you are using arrInventory.CurValue in event 193. CurValue expression is only available in "Array For each element" loop. It will not work in System-For loop. But, the problem with Array-For loop is that you can't stop it, so you'll need to rewrite some of the code.

    Besides, your events 192-193 are inside the For loop, so they are executed multiple times. I think the structure of your function should be like this:

    On function checkProhibitedItems
    ...System For x from 0 to arr.width-1
    ......arr contains 
    ...prohibitedItemsLoop=arr.width : success
    ...Else : fail
    

    Also, prohibitedItemsLoop counter is not a good indicator that the array doesn't contain prohibited items. What if the prohibited item is the last element in the arrInventory? The loop will stop at the end, but the function will still return "success". I suggest using a boolean variable "prohibitedItemFound" instead. Set it to 1 if array contains prohibited item.

    .

    Finally, try running the game in debug mode and also add Browser-Log actions in key events to print some important information, like variable values etc. This will help to understand what's going wrong.

  • It's not a great idea to use both Touch and Mouse, especially in the same events. Also, since you have two identical sliders, it's better to use two instances of the same object and containers.

    I don't have the "Adjust HSB" effect you are using, so when I open your project, some events are removed. I decided to made my own example, hope it helps:

    dropbox.com/s/mvllis416491ywn/SlidersTwoLayouts.capx

    The green rectangle is for easier dragging on touch screen, you can make it invisible of course.

  • System - create object at Mouse.x, Mouse.y

  • I think you need to convert these values to a 2D array, sort the array, and then convert back to string. Or just leave as the array.

    Unfortunately, Array-Sort action only sorts by first column (Y=0). Sorting other columns is a bit trickier, here is a demo I made some time ago:

    dropbox.com/s/88wse8qyrr3ysgs/arraySort.capx

  • Add Browser object, it has condition "Is portrait/landscape"

  • Are you making a browser game? The most fail-proof method is to start playing music and other sounds only after a user input, for example you can put "Press any key" on your start screen and start music in "On key pressed" event.

    In Construct 3 you need to use Remote Preview, if you want to preview in Firefox or some other browser.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think the only way is to time manually with a stopwatch. And then put some markers into the text. Something like this:

    <0.01>The <0.4>quick <1.0>brown <1.6>fox <2.0>jumps <2.5>over <2.8>the <3.0>lazy <3.5>dog.

    Although, I don't know if speech synthesis has the same reading speed on different devices/browsers.

  • Different browsers support different audio codecs. If your music is in ogg format for example, I believe it will not work in Safari. Also, the browser may require user input (touch/click/key press) to start playing audio.

  • There are no settings afaik, but the format of audio files is important. Just see how everything is done in the template and replicate in your game.

  • Does the sound/music work when you open official game templates? For example, Kiwi Story?

  • It should work. Are you resetting global variables anywhere in the project?

    Try running your game in debug mode (Ctrl-F4) and see if the variable value is correct when you switching layouts. If nothing helps, please share you code or project file.

  • You can try effects, for example "AdjustHSL" effect with different Hue values.