dop2000's Forum Posts

  • So the inside of the house should be completely dark?

    Create a new layer (transparent), place a black rectangle above the building:

    You can add a smaller light source to the same layout with "Destination out" and pin it to the player.

    By the way, I suggest you use resources wisely. There are like 5 objects in your game and it's already 23Mb!

    Light image alone is 3Mb. You can make it 10 times smaller and stretch on the layout.

    Fireplace sound - 15Mb! Do you really need 5 minutes of high-quality fire crackling sound??

  • I don't understand your problem, really.

    After objects are destroyed, they are gone, forget about them.

    It's entirely up to you how you spawn new objects. You can create them at random intervals or when some event happens in your game.

    Make sure you create new objects inside the layout, or they will get immediately destroyed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You mean insert line breaks?

    Set spritefont text to "Paragraph 1..." & newline & "Paragraph 2...."

  • It will be easier to understand the problem if you could share your capx, or at least a screenshot.

  • Destroying part is easy - just add "Destroy outside of layout" behavior to these objects.

    You'll have to create some events to spawn them when you want them to appear on the screen.

  • What do you mean by "disappear"? Become invisible? This will give you zero performance improvement, because it doesn't matter if off-screen objects are visible or not, they are not rendered.

  • I think "Apply force" or adjust VelocityX to Self.Physics.VelocityX+windSpeed, on every tick.

  • Here is my attempt:

    https://www.dropbox.com/s/xtyt0o9icn9jr ... .capx?dl=0

    Not sure if this is how you want it to work, but my version doesn't require "waits". And I also don't like using arrays <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • klabundee in his example doesn't compare time or speed, which means if you move your finger really slowly across the screen, it will still be recognized as a swipe.

    I would do something like this:

    On any touch end

    Touch.speed>200

    ....Touch.Angle between 60 and 120 -> Move character down

    ....Touch.Angle between 150 and 210 -> Move character left

    ....Touch.Angle between 240 and 300 -> Move character up

    ....Touch.Angle between 330 and 30 -> Move character right

    For more strict swipe recognition you might want to check if the time between touch start and touch end is less than, say 1 second.

  • Ashley

    Sorry, I meant Debug preview. (in Chrome)

    It's not a big deal actually, as I'm using the Desktop build where Ctrl-F4 works. If only Ctrl-W were also working...

  • No, like this:

    It would actually make more sense to move this code to a separate event or function, and call it when some Unit parameters are changed.

  • Banatawa

    Use random(151) - this will return a number from 0 to 150.99999999999

    So you if you want to round it to the nearest integer:

    round(random(151))

  • I suggest you start with some tutorials:

    https://www.scirra.com/tutorials/all

    Here is one about saving/loading game progress:

    https://www.scirra.com/tutorials/526/ho ... -savegames

  • You do not have permission to view this post

  • I guess you can use something like this:

    System-> compare two values -> CSV.At(row, column)=""

    or

    System-> compare two values -> int(CSV.At(row, column))=0