AllanR's Forum Posts

  • you do it in the event sheet - System Create Object ArrayName

    you can also add an array to a container. Then, whenever an instance of the container is created the array will also get created (and automatically picked with the container).

  • yes, the whole array is converted to JSON and saved/loaded as a single string.

  • I gave it a try...

    every tick I calculate the distance the mouse is from the middle of the face - between a max of -100% and +100% in both x and y axis, then move each eye that percentage of the max distance it is allowed to move.

    the face is a container, that has the face, a left and right eye, and an eye background. That allows for multiple faces to be on the screen at once, and each set of eyes gets set based on where the face is in relation to the mouse...

    the faces have drag and drop so you can move them around. add a face by pressing Z, delete a random face by pressing X, change the scale of each face to a random value between 50% and 200% by pressing Space.

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

  • I don't think there is a standard way to do it...

    when I need a lot of buttons, I find it easier to have one button sprite (with a normal, hover, and down animation), and I then pin a text object to each one for the text (and sometimes an icon as well). That would allow for easier translations...

    the only issue I have had with this approach is if the button is then pinned to something else - then the text lags behind the button a little. So, what I have to do is pin the text to the same object that the button is pinned to. Then everything moves nicely together.

  • html elements like buttons and text boxes will automatically scale themselves like that to try to keep as much on the screen as possible. Another issue with html elements is that they float above the canvas, so nothing can ever pop up above them. Different browsers can render them slightly differently as well. You can also run into focus problems...

    using images as buttons solves all those issues. There are a couple things to watch out for when using images - if you have overlapping image buttons, a click will happen on both if the mouse pointer is over both, so you have to make things work the way your players expect. Plus, things can get a little tricky handling multi-touch properly. All things considered, I much prefer making my own buttons with images.

  • there really are only two options - either set up your layout so the player can never get close enough to the edge to prevent a screen shake (if there is no more layout available to bring on the screen, then it can't shake).

    or turn on unbounded scrolling, but then you have to make sure your character can't leave the area where your graphics are, and that there is enough background beyond the edge so that when it shakes the screen you don't see the white edges with nothing on it.

  • select Layer 0, and then over on the left side of the screen, under Properties / Appearance, check the Transparent checkbox.

    The first layer created is not transparent by default. Additional layers are so you can see through them to lower layers... so when you create a new layer and move it under the first one - you wont be able to see it.

    You may want to set your BG layer to not be transparent while you are at it...

  • brunopalermo

    the problem is that when objects are created, they are not added to C3's internal object lists until after the top level event that creates them.

    in your sample file, that is the entire buildlevel function that starts at event 3.

    that means you can not pick them yet in event 14 where you want to destroy them.

    the easiest solution here is to add a Wait 0 action to event 10. That will defer running the "place enemies" loops until the end of the current tick - by then C3 has finished adding all the tiles and they can be picked the way you would expect - and destroyed as required.

  • someone faced the exact same problem yesterday - in fact I still had the test project I tested with open...

    pasted in your address "http://fandomfaceoff.com/test/test.php"

    and got the same warning - insecure content blocked.

    change your address to "https://fandomfaceoff.com/test/test.php"

    and it works fine - you need the s in https to make it secure.

  • I just tried it on my old iPhone (iOS 12.0.1) and it worked fine.

  • I just checked my junk drawer and found an old tablet that is running 4.4.2

    it doesn't hold a charge for very long, and I just plugged it in... I can try it later.

    I also have a customer with some really old tablets, but I wont be able to see if they have a 4.2 one until Monday.

  • You can pick the newly created objects by their UID - so it is possible to pass the UID into a function, or you could set a global variable to the UID and pick it that way. Wait 0 can also be used to defer actions until the end of the current tick - which is after the top level event that created it, so the new objects are then fully available.

  • it is not happy with "http://..."

    change that to "https://..." and it works fine with you php script.

    "https://www.zvornik24.info/potd/update.php?ver=2"

    without the "s" it was showing an error in the preview window, up in the top right corner - if you click on that and gave it permission to access unsafe scripts, it then started working.

    but with the "s" it works every time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • buttons will still work - even if the layer they are on is invisible.

    either add another condition on the Button click events to check if the layer is visible, or put all the button events for the store in a group and disable the group when the store is not visible. And enable the group when you show the store...

  • you can use IndexOf to search the X axis. If the data you are looking for isn't in the first column then you have to manually loop through each element of the array

    or use a second array as an index back to the first array - copy all the data from the column you want to search into the first column of the index array, the second column is set to the row the data came from in the first array. then you can sort or search the index array and link back to the main array...