R0J0hound's Forum Posts

  • No, unique ids cant be changed. You can see what the unique id is with the .UID expression.

  • [quote:tl0o5nwo]Is there a way to type the tab character ('\t') when setting text in a text box?

    Two ways come to mind:

    1. Type tab in Notepad and copy/paste it over.

    2. Use the python expression: python("'one\ttwo'")

    [quote:tl0o5nwo]How many spaces is this tab?

    Measure it and see.

    [quote:tl0o5nwo]Is there a way to set the tab spacing amount?

    You can do this manually by using a bunch of spaces instead of tab.

    [quote:tl0o5nwo]Also, is there a way to set the width (eg. 4 spaces)

    EditBox has an action for that: "Limit Text"

    [quote:tl0o5nwo]alignment (left or right)

    Left is default. Right is not possible without using the winapi through python.

  • [quote:34a2fx0d]This doesn't solve the problem (it still pastes to all the sprites)

    The Sprites share the same texture, so if you change the texture on one all of them change. One way you can do it is give the Sprite 16 animation frames and assign each instance a different frame. Another method is use TiledBackground objects instead of sprites. They can each have different textures but only with the load texture action, so you'll have to save the image from the canvas to a file first before loading.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Until we get a xml plugin, python can be used to load xml files.

    This topic has some caps that load Map Editor files using python:

    http://www.scirra.com/forum/viewtopic.php?f=3&t=7670&hilit=mapeditor

  • Here is the topic that zenox98 is talking about.

    http://www.scirra.com/forum/viewtopic.php?f=3&t=7670&hilit=mapeditor

  • [quote:1iw8l0zl]Is it possible to access a "Box" object's private variables from Python?

    No, not directly. A recompile of Box.csx would probably fix it so it uses the updated code that Sprite uses.

    A current solution is to use a hybrid event/python approach by setting a python variable to one of the box private variables with the "Run Script" System action.

    + System: Start of layout

    -> System: Run Script ("foo=" & Box.Value('foo'))

  • You can hide other windows with python with the ctypes library and the winapi reference. In particular the ShowWindow function should do the trick.

    Example that hides any window for 5 seconds:

    http://dl.dropbox.com/u/5426011/examples4/windowhide.zip made in 0.99.97

  • [quote:2mya6rua]Is it possible to access private variables from Python?

    Yep, exactly the way you posted. If the variable name you use does not match any of the Sprite's private variables NULL will be returned.

  • Tokinsom beat me to it, but here's another example:

    http://dl.dropbox.com/u/5426011/examples4/randomname.cap made in 0.99.97

  • By reversing the actions in event 32 fine changes of movement aren't remembered. In which case unlimited framerate will not work because any small changes in motion will be rounded out, so the object won't move. One thing you could try is use "int" instead of "round" and see if that reduces the jagginess.

  • [quote:1hdneyrp]Problem 1 is the player will occasionally land a pixel or 2 inside of the platform.

    One solution would be to not use "Custom Movement" and just move the Sprite manually.

    Use "overlapping at offset" to check if it will collide after the next move. If it doesn't, move it. If it does then do a loop moving 1 pixel at a time in the direction of motion until it is right against the obstacle.

    [quote:1hdneyrp]Also, you will see in event 2 that I round the player's x and y positions every tick. I did this because it results in smoother movements and scrolling, and is essential with such a small resolution. Problem is, now the player won't move at all when I use unlimited framerate mode.

    Unlimited framerate makes tiny steps in position, which end up getting rounded away every tick.

    For example.

    say Player's X is 100 and horizontal speed is 50 pixels/sec.

    newposition = oldposition + speed * time

    Vsync 60 fps, time=1/60 sec

    newposition = 100 + 50 * 1/60

    =100.83 which rounds to 101

    Unlimited ~ 900 fps, time=1/900 sec

    newposition = 100 + 50 * 1/900

    =100.05 which rounds to 100. No motion.

    Here is your cap modified with a no behavior approach:

    http://dl.dropbox.com/u/5426011/examples4/nobehavior%20platform.cap made in 0.99.97

  • The "OR" condition can cause crashes in some situations.

    There are 4 places where you are using OR that is causing the crash on restart.

    event sheet: Mario Movement2

    group: Items

    event 111

    group: enemies\mario damage

    event 30

    event sheet: Mario Movement

    group: ground

    events 14,108

    If you disable those events it won't crash anymore. You'll have to rework those events.

  • For "On Control Released" an inverted "control is down" condition with a "trigger once" should work.

    "On Any Control pressed" has to be done manually by checking each one.

  • Experimental cap to C2 converter alpha

    It takes a cap file saved in 0.99.96 or later and try's to convert as much as possible to a Construct 2 (build 30) project. There are many differences between Construct 0.x and Construct 2, so only features common to both can be converted. Anything else will just be ignored.

    It's alpha because I haven't tested it with that many cap files, so there is probably many unsupported cases that will cause a crash.

    Objects converted:

    Sprite, Text and Mouse&Keyboard.

    Download:

    http://dl.dropbox.com/u/5426011/utility/capConverterAlpha1.zip