locohost's Forum Posts

  • Uhhh, I've tried to post the solution to this thread two times now and my post is not appearing? What's happening?...

  • > Hi,

    > Have you tried using Pick All condition before the second Pick by UID?

    >

    I thought that with pick by UID it was not needed.

    If the sub condition is at first level you don't.

  • Hi,

    Have you tried using Pick All condition before the second Pick by UID?

    Yeah I tried that, but you don't need that if the sub is out at first level. It repicks from the full list.

  • Just a simple instance factory? The code below never executes inside where I'm picking the arrow created by the factory call. If I move the "Add_Message" line up above to the Token pick, I can see the arrow UID is 201. So it is getting created. I've tried the arrowUID both static and not static.

    Should this work or no?...

    [attachment=0:173n4lin][/attachment:173n4lin]

  • Yeah you guys are right, it's easy. I used a ternary operator to basically perform a trunc()...

     decimalAngle = ( decimalAngle < 0 ) ? ceil(decimalAngle) : floor(decimalAngle)[/code:36vds46g]
    This works. Thank you everyone!
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmmm... Ok you're right. Perhaps using the negative number in the OP is making this harder to understand

  • int(), floor(), ceil() all round up. Not sure why.

    For now I'm using this string parser/converting/thing, calling it "Trunc". It's working...

    [attachment=0:264l7ujo][/attachment:264l7ujo]

  • I use this feature a lot in Sublime. Visual Studio also has an equivalent (Ctrl + ,) which brings up a "Navigate To..." window.

    http://blogs.msdn.com/b/vsdata/archive/2009/07/02/tips-using-navigate-to-for-search-in-visual-studio.aspx

    True, true. I use VS quite a lot at work. I feel the fuzzy matching is much better in ST3. Putting the ST3 Ctrl-P functionality in C2/C3 would make it a truly killer editor.

  • I haven't used ST3, so unless you describe specific shortcuts with a clear definition of what they do in the context of the C2/C3 editor, I won't know what you want.

    Sorry, Ok I'll try...

    When you hold down the hot key, in ST3 it's Ctrl-P, then start typing, a small window pops open at the top of the editor window that shows search results across all files in your project that match what your typing as you keep typing. The truly awesome part of it, is the fuzzy matching. You don't have to bother with typing spaces or special characters when searching. It finds the characters you type actually across word boundaries. It's highlighting the results as it matches so you just type a few characters, then press enter to instantly jump to any file in the whole project structure.

    I'm not sure if I'm describing this well. I hope I am. It really is kinda like magic. It's the main (among many) reasons ST3 is the dominant Javascript editor today. It's $70 to register and worth every penny.

    I think what could be an even more awesome feature for C2 or C3 would be to do the above, but jump to any event/function definition in any file. With this feature you could jump around your code, anywhere in your code, nearly as fast as the ideas/solutions pop into your head. Can you imagine it?

  • ceil(-32.7023072454) = -32 <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    https://www.scirra.com/tutorials/77/nat ... onstruct-2

    Umm, thanks, but click the link you provided...

    Ceil(number) - Round a number up (eg. ceil(6.1) returns 7).

  • int(-32.7023072454) = -33

    floor(-32.7023072454) also = -33

    How can I get just the -32 integer part?

    Thanks

  • Ashley Duplicate the Sublime Text Ctrl-P functionality in Construct 3 editor and you not only don't have to give me a discount on C3, I'll pay double for it! No, seriously I will

  • Ok I see. Nah that's still a ton of arrow clicks to get up/down the a big event sheet. Too slow.

    I really loooooove using Sublime Text 3 for my Javascript coding. It has so many ridiculously awesome hot keys you barely even need a mouse. I was wishing for some hot key editing speedups like this in C2 editor. Too much mouse over here click, press 5 keys, mouse more over here click click, press 5 keys, mouse more over here click. It's so inefficient for fast editing.

    Open up ST3, press Ctrl-P and start typing. Yeah, it's effing magic! It's why ST3 is the editor nearly everyone uses for Javascript.

    I suppose I can hit the bed tonight and dream about ST3 like features in Construct 3 editor

  • Sounds like maybe you know a hot key combo I don't? "Choose level of hierarchy" escapes me.

  • Very funny

    I'm guessing you realize I meant full jumps up/down to prior/next event block

    What about the Save/Run combo button? Don't like?