AllanR's Forum Posts

  • see this thread, it shows how to do it and provides an example...

    https://www.construct.net/en/forum/construct-2/how-do-i-18/load-different-image-151138?kws=load%2bimage%2bframe

  • all instances of Sprite use the same image, so whatever the last one loaded is.

    load each image as a different animation frame and set accordingly.

  • just check the value in the array before you set the text output...

    if it is a code you want to behave differently, make it do what you want, else output the array value the way you were.

  • The event that is creating you sprite must be running every tick, so check the condition that makes the event happen - the condition is staying true so it keeps creating more instances. Either add a "Trigger Once While True" to the condition, or structure it some other way so that it can only run once.

    or post your code so we can see what is going on.

  • I made a quick sample...

    you need to push a new row into the array, and then access the proper Y element for each piece of information.

    it starts off blank because there is nothing in the array. I call a function at the start and after you click the add button. At the start it shows all elements in the array, after the add button is clicked it just adds the last row in the array. If you double tap then it restarts the layout but that happens so fast you can't see it...

    I use % (modulo) to wrap the objects to the screen.

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

  • you would do that with AJAX and request the file you want from your site server, or get data from a mySQL database on your site. You have to use SSL these days to make it work.

    there are some good tutorials to get you started, and if you get stuck there are plenty of us with lots of experience with this.

  • the easiest way would probably be to give the thrown object bullet behavior with a strong gravity, then work out the bullet speed required for each location.

    is the enemy above the player? or on the same level? and how much can the player move around?

  • I am not sure Maverick understood what you were after...

    You can make a custom "button" by using any Sprite, and then use either Mouse or Touch events to tell when someone has clicked on the image. Touch is the best option because it will work with both mouse and Touch.

    You can set the opacity to zero, or set the sprite's Visible state to Invisible, BUT neither of those setting will stop the "button" from working. The touch events will still work even though the user can't see it. So you must add another condition saying Sprite is visible, or move the sprite off screen, or use some other method to stop the button from being clickable.

    If you are using the built in Button object, then you do have to use CSS to change the buttons appearance, but those types of buttons float above everything else on the canvas and are harder to get the results you want. I would definitely recommend using a sprite instead!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rather than using AbsoluteX and Y, I would use just X and Y and specify the layer name

    Touch.X("UI") and Touch.Y("UI")

    This is if you want the object created on the UI layer. If you want the object created on a different layer then change the name of the layer in the brackets to get the correct coordinates for that layer.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • well, you are correct - that is pretty simple and there are no obvious problems with the events.

    the sdk says there are two levels of debugging logs that get output to the console. you could try that...

  • invisible sprites can still be clicked on.

    I would be happy to take a look at your test file.