R0J0hound's Recent Forum Activity

  • It's not a bug it's the way picking works.

    Event 4 picks only the sprite overlapping the Scan object, so in the sub event 7 you'll only be checking for an overlap with that sprite. If you want to check for overlaps with all the sprites then functions work since what's picked isn't passed to the function. Another idea would be to use the "pick all" condition.

  • You could use a regex search i suppose. Find in C2 uses a regex.

    You could also use the javascript "indexOf" to do it. It's case sensitive.

    global text variable="Aa"

    start of layout

    Text: set text to Browser.execJS("'"&variable&"'.indexOf('a')")

  • tulamide

    Hey that sounds pretty cool.

    megatronx

    I guess he could by generating it on the fly with webauido, but from the sounds of it he's using something else to program directly with a dsp chip on the soundcard.

  • socialpilgrim

    For everything except paste the coordinates to draw at are relative to a unrotated canvas.

    To have the point be the right spot you could use this equation to rotate around the canvas' center by the canvas' angle:

  • If you mean properties for your plugin you can specify the type as integer or float:

    https://www.scirra.com/manual/20/properties

    Otherwise all numbers in javascript are double.

  • I can't open your link. Put spaces in the url or put it in

     tags.
    
    Usually typical random is too noisy to be smooth.  Using perlin noise is one option to have smooth noise.  Another is to generate the noise at a lower resolution and interpolate to a higher resolution.
    
    Squidster's go faster uses the second idea.
    
    For the first you could look here:
    
    It uses the noisejs plugin
  • Presumably you can access and change the collision polygon at runtime with the sdk. Yann's "polygon" plugin changes the collision polygon as I recall. You could reference that for an example.

  • Not really enough details to say why it wouldn't work. Assuming the sprite is in the family like you say and it has that boolean set, it should work.

    That said it may not be pickable yet if it was just created and a toplevel event wasn't reached yet. Is it a sub-event of something?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Cool.

  • I did understand it. You want a seeded random number generator.

    These are the three plugins that can do a seeded random:

    viewtopic.php?t=93998&start=0

    viewtopic.php?t=63543&start=0

    viewtopic.php?t=76204&start=0

    And btw here is where you go to find a list of all the plugins:

    c2-plugins-and-behaviors-list_t65170

    If you wan to do it yourself the simplest way is this:

    https://en.wikipedia.org/wiki/Linear_co ... _generator

    Wikipedia also lists other methods here if you're curious:

    https://en.wikipedia.org/wiki/Random_nu ... al_methods

  • SoldjahBoy

    You can do that with the zeropad() expression.

    int(number)&"."&zeropad(int(number*100)%100, 2)

    That only works for positive numbers though. For negative numbers make it positive first, then add a minus sign after. Using a function would be useful in this case.

    Or if you add the browser object to your project you can do it with js:

    Browser.ExecJS(number&".toFixed(2)")

  • You could try moving each piece left by 100*sin(self.angle) pixels or something. You'll probably want to tweak 100 till it looks right.

    Here's the general idea below. If there are still gaps increase 100 to something bigger.

    global number prevAngle=0

    global number prevX=0

    global number prevY=240

    global number turn=0

    start of layout

    repeat 10 times

    set turn to random(-10,10)

    create tiledbg at (tiledbg.x, tiledbg.y)

    tiledbg: set angle to prevAngle+turn

    tiledbg: move tiledbg.width-100*sin(turn) pixels at prevAngle degrees

    set prevAngle to tiledbg.angle

    set prevX to tiledbg.x

    set prevY to tiledbg.y