R0J0hound's Forum Posts

  • For smooth flashing:

    Once per second:

    Set Opacity: 50*sin(time*360)+50

    Twice per second:

    Set Opacity: 50*sin(time*360*2)+50

    Or for a traditional flash (visible/invisible):

    Set Opacity: 100*(sin(time*360*2)>0)

  • What is it? It's an object that creates a silhouette form the object it's attached to.

  • I don't know of any off hand, but a way you could go about it is have two sprites for the player. One of the legs and on for the torso. Put the hotspot of both sprites at the waist and give the legs the platform behavior.

    Then use an event like this:

    Always:

    ---torso: set position to legs

    ---torso: set angle toward position (mousex, mousey)

  • Just use the flash action with a duration of 0.

  • Do it like this for paths relative to your cap/exe:

    AppPath & "\bla\bla.exe"

  • You could try this:

    every tick:

    ----scroll x to player.x

    player y > scrolly + 100:

    ----scroll y to scrolly + 100*dt

    player y < scrolly - 100:

    ----scroll y to scrolly - 100*dt

    The numbers may need some tweaking, but that makes the screen scroll when the player goes 100 pixels from the center of the screen, so you essentially get a dead zone where no vertical scrolling occurs.

    Another approach that doesn't have a dead zone, but is less jarring than scollto, is to always scroll toward the player at a speed proportional to the distance the player is from the center of the screen.

    every tick:

    ----scroll to position: scrollx+(player.X-scrollx)*2*dt, scrolly+ (player.Y-scrolly)*2*dt

    The numbers can be tweaked to adjust the responsiveness. As it is now it will scroll to exactly where the player is in half a second if the player is not moving.

  • Try using the "Path" object. It's "Path.AppData" expression should give you that folder.

  • You're welcome. I sent you the file via PM.

  • There was some php text in the middle of your cap. It only affected the event sheets and was able to recover 98 of the 125 event sheets. I'd recommend running checkdisk or some other file system checker on your hard drive to ensure it's integrity.

  • It works for me.

    I'm using python 2.6.4 but the latest 2.6.x version should work.

    I uncommented "//#define python" from stdafx.h and built DX9_p.exe and DX9.exe.

    I then renamed them to DX9_ps.exe and DX9_s.exe.

    Then with scripting enabled in Construct I was able to both preview and export with no issues.

    If you build the non python runtimes are you able to preview and export cap files with scripting disabled?

  • The sand blocks do have gravity, but to speed things up only the sand blocks around the player are moved.

  • I was able to make a good speed up by using an array to store the UIDs of the Blocks at each grid position. That allows for direct selection of a block at any grid position. With that it eliminated the need for a detection sprite since with the array it's simple to select one grid below.

    I also removed the platform behavior and used events to take advantage of using an array.

    http://dl.dropbox.com/u/5426011/examples7/MineGenner.capx

    A final optimization could be to only have block objects on screen exist to reduce the total object count.

  • Here's an updated python file:

    http://dl.dropbox.com/u/5426011/utility/capreader.py

    It wasn't saving long text correctly.

    If it still isn't working post the cap and I can fix it and my script.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here's a way to do it using a detector sprite.

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

    In contrast Construct Classic makes this is easy to do with one event and no detector sprite.

    + System: For each Block ordered by Block.Y Descending

    + Block: [negated] Block: overlaps "Solid" : offset (0,1)

    -> Block: Set Y to Block.Y+1

    Hopefully those features will make their way into C2.

  • You can get rid of the white lines by making the collision polygon a bit smaller.