farflamex's Forum Posts

  • Ahhh, maybe that was it. I removed it and used a number instead but I think I did have quotations around the string in the property so I'll look out for that in future.

  • I have a global variable, which has the initial value, string, as 'Mothership'.

    I then try to match this up in an event with 'System - MyVariable = 'Mothership' ' but it doesn't trigger. I've made sure the event is firing and I've copied and pasted the text to make sure it's an exact match.

    What am I doing wrong?

  • Never mind, as usual, just as I post, I work it out. You need to put turretname.turret.targetuid!

  • The documentation says that I can get the turrets target with 'targetuid'. I assume this would work like, 'Pick object by UID - turret.targetuid', but I get nothing (i.e 'targetuid' doesn't come up as an option when I type turret.)

    I don't want to fire a bullet, rather create an explosion immediately at the target, so I need to get the object that the turret is firing at (the turret is rotating and 'firing' but I just can't work out how to pick the object).

  • Can I make a sort of custom viewport? I'm trying to split my screen evenly, 3/4 showing a tilemap on the left and 1/4 showing a text panel on the right. I'm using a scroll-to sprite to allow me to scroll around the tilemap but I can't get the math right, other than trial and error, to keep the tilemap centred in the left 'viewport'. I want, for example, to hit a key and have the scroll-to go to various corners of the tilemap, or just allow it to scroll around with the 8-way behaviour. But it should always keep the tilemap centred on the left 3/4 of the screen rather than centrally.

    So basically, I want to create a 'window' on the left and a text-panel on the right.

  • Mentioned this yesterday, but I don't know a solution. When I click my notifications, I get a 'broken' page. It's been like it for months. It's really annoying because I don't know which topics it's referring to and I'm currently subscribed to several and I have no idea if my comments were replied to.

    Is there someone that I can talk to in support who can fix this?

    I have tried refreshing the browser.

  • Found the solution, apparently you can do Mouse.X("LayerName"), never knew you could specify a layer for Mouse.X and Mouse.Y but... yep!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This sort of thing happened to me in a previous project. Assuming that it's at least picking all of the possible choices (that's one problem, the picking / grouping issue sometimes causes confusion), then I would have thought pick nearest would work. If not, I'd probably do it through the debugger and maybe calculate the distance myself (there's a distance expression that works). If it's not picking correctly with pick nearest, are you sure the one you want is even included in the picked group? And if so, maybe the origin points are out?

    I just re-read and see that the issue is that it's picking two instead of one? If you're doing picknearest, it should always pick one. So if it's picking two, are you sure the event isn't being run twice (happened to me before!)

  • I've scaled my tilemap to fit nicely on the screen, but now positiontotilex and y is completely out. I have the tilemap on it's own layer, so I tried scaling that to the same scale, but I'm still getting the wrong results.

    Just an update, I've noticed that mousex and mousey are miles off after scaling a layer, so that's the problem. Any idea how I fix this?

  • I have now and it's still broken. I wouldn't mind if it was just the odd occasion, but it's been perma-broken for a very long time now. Fairly sure I've missed replies to topics I was involved in etc.

  • This has been happening for months now, if I click the icon saying that I have a notification, I get an error saying it's broken and it's being looked into. I assume at this point it's something else. Kinda annoying because I sometimes can't remember what posts I've been reading etc.

  • Oh, thanks. I eventually just saved and loaded, that works fine as mentioned.

  • I'm using a paint package to make a small monochrome image (a tile) on a transparent background. It's fully transparent in the paint package and I've done this many times before. All I usually do is just copy it from the paint package into the clipboard and then paste it into the image editor, but it's arriving without the transparency. Any ideas what's causing this?

  • Just a couple of minor points, not the solution to the main issue.

    You don't need 'index' in layout 0 as a variable. Construct has a 'loopindex' anyway which will just be set to the current number of times the loop has passed. So just replace 'index' with 'loopindex' and remove your index variable (and the 'Add 1 to index').

    You don't really need the label 'each question' in the loop. I'm not sure if you're mixing it up with a foreach loop and was trying to name it appropriately. But in this case, you don't need a name for the loop at all.

    I've sent a request but I can't see what's going wrong. What I'd do is run in debug mode, then at the start of layout2, check to see what's in text. You can then see which layout isn't working, that'll be a start.

  • My bad, it was precisely that. I had - header("Access-Control-Allow-Origin: *"); at the top of the file on my server but not on my localhost. Just adding that at the top fixes it. Thanks.