quackgyver's Forum Posts

  • Use cursor.pickedcount instead.

    Thanks, but will that act as .Count if no other picking conditions are included in the event?

  • Why does Object.Count pick every single object instance in the Layout when used with "Pick by comparison" instead of only counting the object instances that match the evaluation?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • From time to time I find myself needing to pick any instance of ObjectA, if the value of its instance variable matches the UID of ObjectB, but in doing so ObjectB also needs to be picked.

    Sometimes I also need to count the number of instances of ObjectA which instance variable match against the UID of ObjectB, which means that it would need to return 0 if there are no such matches.

    I've used various methods to achieve this ranging from looping to using containers, but given that Construct often has clever shortcuts to otherwise convoluted operations, does anyone know what the most efficient way of achieving the desired results is, by only using pure vanilla events and expressions, and without using custom code or plugins?

  • Hi,

    Why do Dictionary key/value pairs return "Infinity" on the first loop after being created, despite being created with a value?

    For example, if you create a key called "Foo" with the value 5, and you then do a "Trigger once" that outputs the value of Dictionary.Get( "Foo" ), it returns "Infinity" instead of 5.

    However, if you change "Trigger once" into "Every tick", it's then able to return "5" due to the subsequent loops correcting the loading.

    Is there something about how Dictionary objects load values that works differently from how normal variables work in Construct?

  • You probably can get some more info about what didn’t work by looking at the browser console. Shift+ctrl+ i in chrome and edge.

    There are no console or network errors to speak of when this happens as far as I can see, and it also doesn't seem to matter what URL I'm trying to load or from which origin. There seems to be something about loading URLs on runtime that doesn't work, while loading the same URL as a property setting within the iframe object works fine.

  • Hi,

    I've always wondered about this. I've never in my years of using Construct 3 been able to make iframes load URLs after runtime, through an event action.

    For instance, I currently have an action similar to this in my event sheet:

    On button press - Load URL "http://google.com"

    But on runtime, the debug window shows the iframe as having:

    iframe URL about:blank

    (about:blank is the default URL that the iframe object has in the properties)

    This is not specific to my project. I've simply never been able to make an iframe load any URL on runtime. iframes only seem to be able to load the URLs that they were assigned through the properties while editing the object in the editor.

    Is anyone else familiar with this, and does anyone know how to fix this?

  • I sent an exported HTML game to a friend, who said that 3D mouselook doesn't work on Firefox.

    I tried it myself, and it seems to be correct. When using Firefox, X-rotating the camera on mouse movement doesn't work.

    What's even stranger is that it works on Firefox when using debug mode in the Construct editor, but not when using preview mode on Firefox without debug.

    When in the Construct editor's debug mode on Firefox, capturing the mouse movements seem to work fine as I can easily output the movement values to text, but for some reason it doesn't translate into camera rotation.

    I've attached an example which works fine in all browsers except for Firefox. However, it still works in Firefox preview with debug mode as previously mentioned.

    Attached example: dropbox.com/scl/fi/ustmlnw42fnwlgrng4wbi/firefoxcamera.c3p

  • macOS now has very specific requirements about permissions (you must extract the exported zip on macOS) and security (you must now always at least ad-hoc sign an app for it to be allowed to run). The most up-to-date advice is in our guide on the macOS WKWebView exporter, which although is for a different export option, the requirements regarding macOS running apps is the same. Construct's macOS WKWebView export option also exports some helper scripts to make this easier - if you use NW.js you'll need to do the same things manually.

    Would not following these steps return a message about the app being broken though? Because usually when apps are non-signed, macOS will be pretty explicit about it being a security issue.

  • Hello,

    Based on your message, I guess you want to test Browser or Ajax url ?

    If you want to test URL, you can press F12 and check "Network" for XHR request.

    If the window is not showing, you need to click outside of the game (but still on the preview game window)

    And if you want to test ingame, just create your debug mod.

    Put a text object on your game, and add some event that write logs you want.

    I'm looking to modify the URL parameters during runtime with the debugger open.

  • Since the preview function insists on opening previews in a new window instead of a tab (which for some reason overrides a browser's "tab over window" settings), and since the preview doesn't have an address bar, and since you can't remote debug, and since you can't copy the URL of the preview and load it in a new tab (which just generates a white page), how are you supposed to be able to test URL parameters with debug mode turned on?

  • I've never had issues with this before, but every macOS export I make now returns:

    “app.app” is damaged and can’t be opened. You should move it to the Trash.

    Is the export function broken?

  • Check the layer opacity and the tilemap opacity in the Properties Bar.

    The issue isn't opacity, because otherwise I wouldn't have been able to see the cursor changing into the selected tile.

  • I've never had this issue with Construct before, but for some reason I can't place tiles using the Tilemap object.

    The tiles show up just fine in the sidebar, and I can select them so that the cursor changes into the chosen tile. However when I click on the tile area in order to place the tile, nothing happens. The tile simply doesn't show up.

    Does anyone know what's causing this?

  • I've deployed my game to a web server, and I'm using mod_rewrite to rewrite paths under the game's folder into a query param - which is in turn then read by the Construct game.

    For the sake of discussion, we can assume that the game is deployed to /foo and that /foo/bar is rewritten into /foo?hello=bar.

    The problem is that Browser.QueryString returns completely empty when this mod_rewrite rule is applied (i.e. while /foo/bar is being rewritten into /foo?hello=bar), whereas if I navigate directly to the param then it works (i.e. if I write /foo?hello=bar directly).

    For troubleshooting purposes I've placed an index.php file in the same folder as the game where I've run var_dump($_GET) to ensure that the param outputs correctly while the mod_rewrite rule is active, and it works as expected.

    So my question is, what could possibly cause Browser.QueryString to return an empty string while mod_rewrite is used, despite the fact that the $_GET variable works just fine outside of the Construct game?

  • You say it should be one or the other, so which would your actions apply to?

    It would apply to the instances that were picked as part of the condition that returned true. In other words, any instance that returns true for an OR condition would be picked.

    If picking was reset between or conditions, that is what would happen. Which isn't what currently happens, but that was the provided example of what would happen if picking was reset.

    I don't understand, if OR-conditions un-pick instances that don't return true as part of an OR-condition, why would it not un-pick instances in the provided example?