AllanR's Forum Posts

  • here is a sample of how to do something along the lines of what Maverick was suggesting...

    https://www.rieperts.com/games/forum/ColorSquares.c3p

    it doesn't limit how many times other colors can be added, but you are guaranteed 3 of the color chosen in the dropdown list.

    if you don't mind more than 3 of the chosen color then just delete the while block in the BuildBoard function

    essentially, it builds an array of colors to use for the squares. it doesn't need to sort or do anything to the array because it just randomly chooses an index for the next square and then deletes that index so it can't be picked again.

  • I am also Very interested NFTs and possible integration of a digit wallet!

    so definitely keep us posted with how it goes.

  • the mouse click is a rigger and can't have an else.

    the else under your event is red because it is not associated with any event.

    you can have a sub-event for the mouse click trigger that checks your global variable and turns music on or off.

  • a construct array can only hold text or numbers

    so you could push a second array as JSON, then convert it back to an array when pop it out

  • what I do in cases like that is use a family for the sprites. pick the one to destroy by the family, create a new instance by the sprite name and transfer the variable to the new instance and destroy the family one.

  • the fact that it is red means it has been orphaned from the condition it was attached to. whatever that was has been deleted, so the else turns red to let you know it is not an else for anything at the moment. There is a condition above it but the else is not connected to it in any way except that the else is the next thing on the event sheet. delete the else, right click on the event above and add a new else if that one needs an else.

  • or just set the player to the platform x that it is overlapping

  • I don't think it is connected to the event above

  • There are ways to do it but you may be over complicating things a bit.

    how many choices will there be? a few, dozens, thousands? how many levels of depth do you want to keep? last one, several, lots?

    Since you know the list actions, if that list is static for the level there is no need to store it as the first element of the array.

    as actions are performed just add the action to the end of the array using a single dimension. you don't have to sort it, the first element is the first action...

    you will have a record of what happened and that can be stored in others ways for history.

    I would be happy to show an example or two if you want to see more complicated sorting if you want.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I use:

    document.querySelector("html").style.backgroundColor = "#fff"

    document.querySelector("body").style.backgroundColor = "#fff"

    which I saw Ashley post somewhere a year or two ago and works great for me (obviously sets bg to white)

  • any of the "Form Control" objects are HTML elements that can be styled, but they float above the canvas, and don't render the exactly the same on various devices. all other C3 objects can not be styled with CSS.

    For very simple menus or settings screens you will probably be able to do it, but I find it far better to use sprite buttons that you make part of the canvas and behave how you want.

  • looks awesome! Very nice :)

  • as far as I know the "Has Key" is basically a loop, so the else will almost always get triggered.

    by inverting the first condition you get the "else" effect when the key is not present, and the the actual else will trigger properly when the key is present...

    I haven't actually tested that.

  • the Date object works on timespamps

    to get a date 3 days in the future you have to:

    FutureTimestamp = Date.ChangeDate(Date.Now,Date.GetDate(Date.Now)+3)

  • you can save the dictionary to local storage before the end of the layout. then at the start of the layout check if the dictionary item exists and load it.

    set the local storage item to -> Dictionary.AsJSON