farflamex's Recent Forum Activity

  • Hmmm, interestingly, it does work but not if you just disable the comment, which is why I thought this wouldn't work. Removing the reference completely did allow me to change it.

  • I've come across this a few times with functions and haven't found a good way of fixing it, other than to manually copy the whole thing over. I have quite a large function which I thought would require a return value, but realised later that it didn't. I want to change it to not require a return value but I don't know how.

    And just to add, I tried removing any calls to the function but it still doesn't want to let me change it. If I'm forced to change it manually, is there a better way other than line by line copying it?

  • Yep, you're spot on, that was the problem and adding str did fix it. Good to know for the future as I'll be using this string array quite a bit in my project.

  • I think this might actually be a bug in C3. I can run a check if anyone is interested, e.g Ashley?

    Basically, when I did the comparison between a string and the string in the array, it didn't match. But when I put the string in the array into another string and then compared the two strings, they matched. Not sure if I did something wrong somewhere but it does appear that a string in an array isn't the same as a string.... maybe that's as intended?

  • I have two strings which appear identical. One is set up in a local string variable, as '442' and the other comes from an array and is also '442'.

    I've put them side by side on the screen and they both look exactly like that, but for some reason, a C3 match doesn't want to match them (i.e System String1 = String2 isn't triggering).

    I've tried trimming them both (e.g System trim(string1) = trim(string2)) but it's still not triggering.

    Am I missing something else that can make identical looking strings not match up?

  • I have a bunch of identical objects that have the drag and drop behaviour and each has a variable attached. When I drop one on top of the other, I want to simply switch the variables.

    It feels like one of those issues that are fairly unique to the way Construct works. When you do 'Object On DragDrop drop' and then 'Object is overlapping Object', you've picked ... I think the 2nd object? I suppose therefore the solution is to save a copy of the first objects UID and the variable, save the 2nd objects variable, put the first variable into the collided object, do a pick-all object, find by UID of the first again, put the 2nd variable into there?

    Or am I being dumb and this is much simpler?

  • Thanks, that's a good idea to use the browser log. Not sure why I didn't think of that considering that I've just finished playing around with a large PHP project and was using it all the time.....

  • I'm having a problem trying to work out why an object isn't being picked. My code is picking all objects with a certain value and then picking again on another value, but it's not then picking correctly at the next piece of code. I'm sure I can work it out, but for future reference, when I'm looking at the debugger like this and the engine picks an object, is there a way to know which object is picked? All I can think of is to manually create a variable, load the object UID into the variable and then find the object manually in the debugger. Or am I missing it in the debugger info somewhere?

  • Oh my, I was about to post my code and as I was looking through it I noticed the problem.

    I had a loop called 'FLoop' but I was checking it with loopindex("Floop"). Yeah, they're not the same thing :p

    My bad, it's working now.... I think.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Even then, it feels completely broken to me. I'm running it step by step through the editor. Because I'm confused about which way it will load in the values, I'm having it load it both ways, into two variables, e.g loopindex,1 and 1, loopindex. Even though it runs 10 times, the values never change. The first seems to grab the value at 0,1 and then never change. This isn't right, because, if it's doing it 'correctly' (i.e the traditional way an array does things), then it would run across the values, e.g 442 then 532 then the word 'test', since I've added a new row to try to work out what's going on.

    The second value grabs 'DL', which is at 1,0. Again, this is 'right' on the first pass because I switched it over. But then it just stays the same, stuck on 'DL' for the rest of the loop. It should be running down the row, e.g DL, then DCL, then DCR, but it just doesn't move.

    I can't fathom this out at all, it seems completely broken or I'm doing something fundamentally wrong. It's odd because I've used arrays in dozens of languages, so I know how they work in my head. It's not just a case of C3 being backwards (which it probably isn't), but there must be something wrong in the debugger or in my code, because it's not giving any correct values out at all.

  • Mind you, it's still confusing and something seems to be wrong about the whole thing. For example, now that I've transposed it, yes, it looks in the debugger how it looked in the editor picture above... but now it says that it has 2 width and 11 height, even though the debugger window shows it as 11 width and 2 height....

    I think the only solution is to just run everything through the debugger and try every combination until it gets the right one...

  • Ahhh ok, well it's good to know that it wasn't just me being insane.

    And thanks, the transpose thing will help. At least I know what the array actually looks like now. Mind you, now I've transposed it, it's altered quite a bit, but hopefully if I can at least see how it's structured, that should line up with my code.

    I suppose the main point is, it looks like it looks in the debugger and not necessarily how it looks in the editor.

farflamex's avatar

farflamex

Member since 7 Oct, 2012

Twitter
farflamex has 15 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies