oosyrag's Forum Posts

  • Here is a thread with some information regarding text, see if it helps.

  • Scale inner/outer is what you're looking for. You'll just need to design the layout so that your grid fits in all aspect ratios you want to target.

    If you use letterbox scale, the on screen keyboard will resize the window and cause your screen to shrink.

  • Sorry, still not sure I understand why you need to clear it...

    Regardless, there is no way to delete a save state with the system save action.

    An alternative is to use local storage to manually save and load data, and you can clear those as you wish.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Was there any particular reason CSS is supported for form elements like Button or Textbox but not Text?

    It would be a huge boon for me to be able to style text objects directly for certain UI elements, rather than making a sprite or 9-patch to pin the text to and having to set up containers or manipulate them seperately.

  • When using the LOS behavior, it applies to the whole object, as in any part of the object - in this case your entire tilemap. I assume that isn't what you are going for.

    Edit/Disclaimer: I'm actually not 100% certain about this, I haven't actually tried it myself.

    Here is one excellent raycast function by squiddster, although it might be a little complicated - https://www.scirra.com/tutorials/902/li ... raycasting

    Here is another simpler one by R0J0hound - https://dl.dropboxusercontent.com/u/542 ... laser.capx

    Edit: fixed the link

  • I don't believe there is a way to do this.

    You can overwrite a save though.

    Any specific reason you need to delete a specific save state?

  • There are a few ways to do this. Any LOS check will use collisions. You can use a raycast/LOS function to see if your LOS hits a solid part of your tilemap or not, and get the layout x/y position and use that to get tile index position and ID. This will only allow you two classes of specific tiles though - solid or not solid.

    A workaround is to layer some invisible tilemaps and paint solids where you want them to collide, then you can differentiate which tilemap you are hitting to do different actions.

    A third way is to draw invisible placeholder sprites with LOS behaviors. This way is probably the simplest if you don't have very complex shapes or very large maps for collisions, as you won't need a custom LOS function.

    For your array question, if you don't want to check every cell, use a nested System "For" loop.

    Conditions

    For "x" from a to b

    --- For "y" from a to b

    Expression

    Array.At(loopindex("x"),loopindex("y"))

    Edit: As for performance impact, I'm actually not sure if there is any different between this and for each x/y with additional conditions such as x>a and y<b or something like that. It is something you can test pretty quickly - if there is a noticeable difference let us know! If you can't tell if there is a difference, don't worry about it.

  • For pin behavior, try using debug to confirm you are pinning to the correct object instance, picking instances can sometimes get tricky when referring to the same object.

    Once you have pinned one to the other, you no longer use actions to move the pinned object. When you move the object it is pinned to, both will move.

    In this situation though, you probably don't need the pin behavior at all. As both edges of your platform are the same object with different animation frames, an action that makes that object move should move both/all instances of that object at the same time. Just make sure the ones you want to move are picked correctly with conditions.

  • The official answer is... don't worry about it!

    https://www.scirra.com/blog/83/optimisa ... -your-time

    If that is not satisfactory, this post has a little more details about what really does matter in terms of performance.

    https://www.scirra.com/manual/134/performance-tips

    On a side note, I'm going to guess that maybe you are misunderstanding the "For Each" and "Else" conditions, so I'll leave these here for your reference just in case you haven't read them yet.

    https://www.scirra.com/blog/141/common- ... nd-gotchas

    https://www.scirra.com/tutorials/292/gu ... t-features

  • Add "System - For Each PlayerSprite" in your condition.

  • Try adjusting the period offset as well - it adjusts the starting point of the motion.

    If it gets confusing, try disabling one or the other sine motion to isolate just the left/right or up/down motion first to get the amount you want to move right first, then adjust the offset with trial and error to sync them correctly.

  • Oh sorry you're right, you can't make a global variable boolean. In that case just make it a number and add 1 to it.

    Variable = 0
    
    On Start Layout   |  Action - Do Something
    If Variable = 0   |  Add 1 to Variable[/code:8nymgku8]
    
    Now that Variable is 1, that event will no longer run again even if you come back to your layout a second time. Unless you reset Variable to 0.
  • Did you download the capx I linked to in my previous post?

  • Even if you have scroll to on your main character, you can add additional scroll to actions that run conditionally after that one.

  • Global variables are persistent and can be referred to in any layout.

    The persist behavior can be used to save or keep track of objects' information while switching back and forth between layouts.

    Arrays are also persistent through layout changes and are an excellent way to keep track of structured data.

    On start of layout will occur any time that layout loads. If you want it to run once only, use a variable (for example a boolean called "FirstLoaded"), add a second condition to your start of layout event to check if "FirstLoaded" is false, and add an action in that event to set "FirstLoaded" to true. After running the first time, the variable will be true and that event will never run again even if the layout start triggers again.