R0J0hound's Forum Posts

  • When the walls or "neg" objects are visible and collides with an enemy the player is killed (moved to his last outside position).

    When the "neg" objects are invisible the enemy bounces off them.

    The "neg" objects are made invisible when the player moves on & off the green, and they are done being used to cut up the green.

  • Use the windows api through python to do it:

    http://dl.dropbox.com/u/5426011/examples%209/bmp_draw.zip

  • delgado

    It is a bug with the export with r81.

    Bug and workaround here:

    http://www.scirra.com/forum/r-81-log-is-not-defined-c2runtimejs1510_topic49919.html

    Balky

    Those bugs all stem from that one bug I mentioned at the end of my first post. Change the repeat in event 53 from 20 to 100 and that should reduce the occurrence. What needs to be done is a proper flood fill algo that fills completely in on tick.

  • I decided to have a go at this type of game using only the included plugins so it can potentially be uploaded to the arcade.

    http://dl.dropbox.com/u/5426011/c2/boxsplit/index.html

    capx: http://dl.dropbox.com/u/5426011/c2/boxsplit.capx

    The events are not very well organized and I probably should have added more comments, but at least it works.

    My approach was to slice a sprite up into smaller sprites, then do a flood fill from the balls to find the isolated areas.

    One flaw it has is the green can sometimes clear prematurely. This is caused by an incomplete flood fill. You can increase the repeat count in event 53 to make a incomplete fill less likely.

  • You need to re-structure your events so that "collision=0" is also a sub-event of the loop.

    +------+------------------+
    |System| Repeat 1000 times|
    +-+----+------------------+
      +------+----------------+
    --|player| collision = 0  | Actions...
      +-+----+----------------+
        +---------------------+
      +------+----------------+
    --|player| collision != 0 | System  | Stop loop
      +-+----+----------------+
        +---------------------+
  • It breaks the physics sim if you change the size of a physics object. Use another non-physics object to cover the gap.

    https://www.dropbox.com/s/4hmm3tz7wejgh ... .capx?dl=1

    /fixed/ubivis.capx

  • Yann

    I found the cause was a bug: http://www.scirra.com/forum/topic49991_post314880.html#314880

    Are you certain it's working for you? The test I used was get the ship moving in a direction then turn the ship 90 degrees and shoot. The bullets should move with the ship.

    Your 2nd capx works because the angle is 0, which is the only case where the bug doesn't appear.

    robit_studios

    I found that Yann's original example wasn't working quite right due to a bug with the bullet behavior. But I imagine it will be fixed quickly and then Yann's sterling example should work as intended.

    A workaround solution is to not use the bullet behavior at all but use variables for x and y velocities, then move with events:

    http://dl.dropbox.com/u/5426011/fixed/space%20shoot.capx

  • First I'd like to say that this is with the "set angle" property of the bullet behavior set to "No". It should allow a sprite's angle to be changed and not change the angle of motion.

    The bug is the angle of motion of the bullet behavior is independent of the sprite's angle only when the sprite's angle is 0.

    Tested in Firefox 10.0.2.

    Capx:

    http://dl.dropbox.com/u/5426011/fixed/bullet_angle_bug.capx

    It should be fixed if this: ..\behaviors\bullet\runtime.js line 72

              if (this.inst.angle !== this.lastKnownAngle)

    is changed to this:

              if (this.setAngle && this.inst.angle !== this.lastKnownAngle)

    For completeness here is my system specs:

    C2 r80.2 (32-bit)

    Winxp sp3

    Intel 915gm graphics

  • Yann

    The "set angle of motion" action wasn't having any effect in your example for some reason, but if you set the angle to "angle(0,0,rVx,rVy)" then it works as expected.

    Using FF 10.0.2

  • Test it and see what happens.

    Here's a plugin to play video files: http://www.scirra.com/forum/plugin-video_topic46310.html

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A way to use the tab in Construct that I've used in CC is to open notepad type a tab, select it, copy it (Ctrl+C), then paste it in Construct with Ctrl+V.

  • A way to handle that that I have used in the past is to use a leading and trailing comma in the list, then not use the first and last tokens, which would be "".

    Here is Yann's example tweaked with that in mind.

    global sampleCount = 3  // number of... number you want
    +System: on start of layout
      -> Array: set size to sampleCount,1,1
    +On What you want
      Local text list = ",0,1,2,3,4,5,6," 
      +repeat sampleCount times
        -> Array: set value at loopindex to int((tokenat(list,int(random(tokencount(list,",")-2)+1),",")))
        -> System: set list to replace(list , ","&str(Array.At(loopindex))&"," , ",")
  • ut in current state of construct's sdk, can someone else make an exe exporter for construct?

    I think so. Capx projects are xml so all the info is readily accessible. You just need to re-create the runtime and plugins. All the EDK will do as far as I can see is make the exporter built-in to C2.

    Using CC's runtime could be tricky since it's tailored for CC and many features of C2 don't have a one to one correspondence to CC.

  • If you use time instead of tickcount you can calculate it as follows:

    Reactiontime = t2 - t1

    which is more accurate because each tick doesn't necessarily have the same dt.

  • You'll have to split the gif into frames with an external program and import the frames. What Silver is saying is you can select all the exported frames at once to load, so it is a bit faster than importing one frame at a time.