AnD4D's Recent Forum Activity

  • I appear to be having some issues with a mouse cursor if I have a 3D Camera enabled.

    I want the cursor to always be rendered on top of everything else, so I have it set on a 2D layer. When I do this, the cursor no longer stays on the mouse's x and y pos so long as I have the 3d camera enabled.

    Why is this? Why are 2d layers affected by 3d cameras?

    I mocked up a quick example. Feel free to check it out.

    https://1drv.ms/u/s!AlZkRk7KfdFFivsjA7O4P3LQrRDW0g?e=0iTe6y

    Is this intended by design? Seems... for lack of a better word... useless for game development. When would you not want a sprite to stick to the mouse if you set it to the mouse's x and y? I'd have thought a sprite on a 2d layer would follow the mouse.

    However, if you open debug and look at the mouse object, it shows a different x and y position for each layer. There's no way I can use this data from what I can tell.

    I want the sprite to appear on the HUD layer, but get its positioning from the 3D layer, apparently.

    Also, I know I could replace the cursor with a sprite, and that works, but for my actual game, rather than a sprite, I'm using particles.

    Any ideas?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Had similar occurences a couple times. A new export, upload, and cache refresh (ctrl+F5) solved it.

    Tried that :D For the past 4 hours, I've been removing eventsheets, sprites, etc, and have finally reached a point where if I delete any more objects, the game doesn't crash.

    Time to submit a bug report.

  • Ashley So... not sure whether to pursue this.

    I started to minimalize the project, deleting events and sprites until it reached the point where the game started working again.

    When that happened, I started backtracking and undoing my deletions until the project stopped working again.

    The problem is... it didn't break again. Apparently deleting the game and undoing that has fixed the bug. Literally nothing else has changed.

    I have a save file before it broke, which is still broken, but how could deleting and undoing solve this problem?

    Do you still want me to figure out which specific sprite or file broke the game? Or should I just shrug it off?

  • Just to follow up, the game also works when exported using NW.exe. It just doesn't work when exported as HTML5.

    Ashley So I'm not sure if this is a bug with something I've changed in the game, but it seems odd that it only appears in the html5 export.

    I've been testing the game online using HTML5 exports from the very beginning, so it's odd that it's suddenly started happening.

    As I mentioned, the only thing I've really added is audio and a few more sprites.

  • I've been testing my game on a webhost, as recommended, for the past 2 months.

    However, today I'm getting an unusual error, and a black screen.

    The error is:

    Uncaught (in promise) TypeError: Cannot read properties of null (reading 'IsInContainer') at Layout._CreateAndLinkContainerInstances (c3runtime.js:1636:210) at Layout._StartRunning (c3runtime.js:1630:446) at C3Runtime.Start (c3runtime.js:3235:417) at async C3Runtime.Init (c3runtime.js:3220:161) at async RuntimeInterface._InitDOM (main.js:41:1) at async RuntimeInterface._Init (main.js:28:372)

    I am able to load an earlier build, and this isn't appearing.

    The only thing I've changed is adding audio to the game, and a few graphics.

    The game plays perfectly fine in preview mode (albiet a little slower than it did in the previous version of Construct 3), but beyond that, I have no idea how to fix the error.

    All I get is a black screen, no audio... nothing.

  • Any chance you can update your topic title to layout rather than layer so this is more useful?

    I just tried a search for "How to check if layers exist", and was brought here :(

  • How did you fix it on CORS?

  • Are you able to post a pic of your events?

    If a sound is to be played if the character is on the screen, it will CONSTANTLY play the sound until the player leaves the screen.

    It won't just happen once. It will be like it's playing the same sound 60 times a second, every second.

    Use the "trigger once" event, or find a better alternative.

  • If you use AJAX to post binary data to the server, then the server will receive all the binary data with the request. Nothing is encrypted or needs decrypting, it just sends the raw data.

    Reading POST data server-side is out of scope of this forum really, it's just a general server coding topic. Sites like StackOverflow are probably a better place for that kind of question.

    Agreed, which is why StackOverflow was the first place I looked, and followed multiple attempts. I came here in the hope that other people had indeed successfully done this and could share said info.

    There are a few examples of people doing this, but either the dropbox example or images were deleted. Likely before the new website update.

    If I can solve it, I'll happily post the solution here, but it's been a few days now of trial and error, with no solution.

  • It's possible by using AJAX to post binary data.

    I've used binary data to transfer images between multiplayer games, but on the server, would I need to decrypt it, or something using php?

    I've tried searching for answers online, but everywhere I get only half the answer.

  • Thanks for the help everyone :)

    I was able to do it using the "pick all" event.

    Hopefully we'll get something like this in the future, along with a "Is Parent of" event ;)

  • I have a parent with a child. That child is a parent with a child.That child is a parent with a child. Etc, etc...

    When I check how many children the original parent has, it tells me 1.

    Is there a way to have the system count (essentially) grandchildren as children?

    I have to keep them separated like this, because the player is able to separate them, and the separated child becomes the parent.

    Think of it like stacking cards. The parent being the bottom card. When you cut the deck half way, the bottom of the new stack becomes the parent. I want to be able to quickly count how many cards are in each stack.

    I'd have thought this would be in by default.

AnD4D's avatar

AnD4D

Member since 4 Nov, 2011

Twitter
AnD4D has 3 followers

Connect with AnD4D

Trophy Case

  • 13-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

21/44
How to earn trophies