R0J0hound's Recent Forum Activity

  • 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

  • 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))&"," , ",")
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • You could apply a upward force to the links to counteract gravity.

  • Here is an implementation of bubble sort if it's of any help:

    http://dl.dropbox.com/u/5426011/examples%209/bubble_sort.capx

  • Yann's solution works for me, it doesn't matter if it's "for" or "repeat".

    Here is an example where a sprite instantly closes the gap with another sprite.

    http://dl.dropbox.com/u/5426011/examples%209/while.capx

    I acts just like a "while" loop. If you move Sprite2 out of the path of Sprite then the game will hang as it try's to loop through a billion numbers.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound