dop2000's Forum Posts

  • The red X means that the event is inverted. Right-click -> Invert.

    In this case it means "if Array NOT contains value r"

    If you want to generate a new set of values when you click a button, I suggest you move this code to a function. And then call this function from "On start of layout" and from "On button clicked".

    https://www.scirra.com/manual/149/function

  • No, R is not an instance variable. It's a local variable (just select any event and press V to create it).

    Local variables are generally used to temporary store some values while the event is executed.

  • Say, you want to pin a sword to character's hand.

    Create an image point on the hand, name it "SwordPoint".

    To pin the sword, first position the sword to "SwordPoint" (using "Set position to another object" action), then pin.

    When you mirror the character, unpin the sword, mirror the sword, set its position to "SwordPoint", then pin again.

    Another way to do this is to move the origin image point on the sword in such way that when you position it to character's origin image point, it appears in its hand. Then you'll be able to simply mirror both the character and the sword.

    See this picture:

    red dot is the character's Origin image point.

    red arrow shows the sword's Origin image point.

  • I tried Bullet and Physics, Physics looks much better. See this demo (there are two layouts, check both):

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

  • I suggest using the array instead of global variables.

    Here is how you populate it with unique random numbers:

    (clickable)

  • Here you go:

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

    The code is not optimized, but it works.

  • rafaelsorgato

    Maybe use "For each antenna" loop?

  • 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.

  • 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.

  • Try Construct 3

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

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