locohost's Forum Posts

  • Ok it looks like I have the right CORS headers now.

    It's Node/Express, this works...

    		
        console.log('Setting headers on server res now...');
        res.header("Access-Control-Allow-Origin", "*");
        res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
        next();
    
    [/code:3pnjantd]
  • Thank you I think you're right about that. However there is no combination of res.header settings that will allow C2 app running in preview ( http://localhost:50000 ) to connect. I can't make it work :-/

  • I doing a simple Ajax call to pull some Json data from a running web server. Here is the code...

    Notice I'm storing the url in the DBG variable. In the debug console, I can grab the url in DBG, paste it into Chrome and the exact Json data expected is displayed.

    However...

    In the code the C2 Ajax error callback is always called, never the success. RETURN_VAL_4 has the "Login error: " prefix and then blank. Nothing in Ajax.LastData. This makes no sense when it works perfectly fine in Chrome.

    What is happening?

    Thank you for helping me past this. I'm stuck :-/

  • Suppose you want to call a function something like str("foo"&sprite.myvariable) ?

    Best tip in a long time. Put all my function names in a few generic object instance variables. One generic object per "class", one Event sheet with class name, functions and vars have class name_ prefix. Keeps everything organized and easy to find. Now I can change the function names any time and as many times as I wish and simply edit the object instance var. Everyone needs to call their Functions like this. So damn good!

  • > I've already solved the problem. I can see my own code. I can enable and disable the issue at will so I clearly see the problem.

    >

    Well, your last post wasn't indicating this at all.

    Ok that's true

    If I may, two polite suggestions for a forums "moderator": Telling a person flat out "you are wrong", using those words, regardless of whether the person really is wrong or not, is "impolite" English at best. It will probably sound rude in most cases. Sarcasm is also very tricky

  • With respects, you are wrong.

    With respect, really don't need "you are wrong" replies. I've already solved the problem. I can see my own code. I can enable and disable the issue at will so I clearly see the problem. But thanks for helping KYATRIC.

  • Isn't this exactly what I was talking about?

    Mmm, with respect, no I don't think so

    The trick (for this bit of code anyway) has nothing to do with the AnimationFrame check and everything to do with the subsequent FamCard.PlayerIdx checks in the nested OR Event. I can do a single FamCard.PlayerIdx = Player_MyIndex in the nested Event and the code works fine, but as soon as you add the second OR'd conditional using the Family instance var, sprite instances outside the original pick then become picked somehow. I think it's a bug.

  • Ok I resolved the issue. This code works and seems to indicate a C2 bug...

    Compare to code in OP to see where the bug is. The 2nd level pick by FamCard in the OR condition is picking instances outside of the 1st level pick. This should not happen.

  • A way to make plugs using events

    I'm not sure what this is. Can you explain briefly?

  • A related note about C2 and C3: The thing that I enjoy the most about using Construct is that fact that I cannot write code. Yes you heard right, I said I'm happy I cannot code. As a veeeery old school coder, 30+ years, I have a passion for writing, re-writing, writing, re-writing my code until it's refactored down to it's most minimal and beautiful perfection. I love doing this sooooo damn much, it actually prevents me from finishing projects! With C2/3 I do not have that problem. I now find myself actually a few dev days from finishing my first multiplayer game project simply because I'm not hampered by my refactoring obsession. I definitely do rethink and reorganize my Events, Groups and Sheets a little more than I should probably, but it's not really slowing me down much.

    So +10 to Construct 2/3 Events system and UI helping me get past my refactoring obsession and actually finish building something

  • How about a nice alternative to the current method of pinning objects ? Maybe in a seperate editor. Drag in all the component parts, place the pins, save all the data and reference all the objects as one when creating the object via events. Like a container but with the pin info.

    Speaking of Containers, I'd love to be able to create and move things in/out of Containers during runtime. We can't do that in C2 can we? I'm not sure as I type this...

  • That _is_ what is wrong with it. Breakpoints need to go anywhere.

  • saiyadjin Ok, understood.

    A question from the OP: Will the debugging greatly, greatly improve in C3? Is that a reasonable feature request?

  • There is no helpful information, topic related thought or relavent question in that post and a commercial link in the sig. Add to the discussion or don't post. That's pretty standard right?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • saiyadjin That's what the thread was missing, a non-content "ad" link to $30 asset pack :-/