dop2000's Forum Posts

  • EMA2826

    Don't use "Wait" action for this! This is a mistake many beginners make and it can cause all kind of bugs and problems.

    Use Timer behavior instead.

    Set Invincible=1, start Timer for 1.5 seconds.

    On Timer event, set Invincible=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • https://www.scirra.com/tutorials/73/sup ... reen-sizes

    To get rid of black bars on screens with different aspect ratio, use scale outer mode and make your background about 15% bigger than layout size.

  • You do not have permission to view this post

  • Try checking for overlapping at a different offset - 15 or less.

  • Make another invisible "inverted" tilemap with tiles in place of holes, and use it for pathfinding.

    Set obstacles=Custom in pathfinding properites and add this tilemap as an obstacle.

  • I think it's possible in C3, but not in C2.

    The best you can do is a bunch of events like this:

    If variable=x then spawn object x

    If variable=y then spawn object y

    etc.

  • If you are using 8-Direction behavior, simply set a low value to Deceleration property.

  • 8-direction is mostly used in top-down games. Frankly, I have never seen Platform and 8-direction being used together in one object.

    You can change the maximum Platform speed with events. Set a higher speed when grappling, then reset back to normal walking speed.

  • Why do you use Platform and 8-direction behaviors on the same objects? I don't think they work together well.

    I would suggest moving the character and blocks using Platform actions only.

  • I replied you in PM.

  • Set s to left(s, 2) & "X" & right(s, len(s)-3)

    If you are sure that there is only one occurrence of the character in the string (or if you want to replace all letters "D" with "X"), you can use replace() expression:

    Set s to replace (s, "D", "X")

  • Do you reset continuecheck and countdown timer at the start of the layout/level?

    Try running your game in debug mode (ctrl-F4) and see what's going on with this variable, countdown variable, layer visibility etc.

    If nothing helps, share your capx.

  • First, if you are using "Check item exists", you don't need "Get" and "On item get".

    You can access LocalStorage.ItemValue from the "On item exists" event.

    But this should not cause any issues.

    Most problems with local storage happen when people don't wait for Set Item action to finish before reading the same item from local storage.

    For example - at the end of the level 1 you save some item into local storage and then change layout to level 2.

    On start of level 2 you Get the same item from local storage. If you don't wait for Set action to finish before switching to the next layout, then there is a big chance that the item will be read incorrectly.

    Another common mistake is when people don't wait for the Get action to finish before trying to access this data.

    For example:

    Get item "HighScore"

    Score Set text to HighScoreVar

    Use "Local Storage -> On all gets complete" and "Local Storage -> On all sets complete" and "System-Signal", "System-Wait for signal" to properly organize your flow of events.

  • You are misusing "Trigger once" condition, and this is what probably causing those problems..

    Your event 912 makes little sense, because you are checking a system variable, picking enemies instances and looping through them, and have "Trigger once" as the last condition, all in one event. It's impossible to tell how this will work.

    Here is how I would change it:

    Ctrl_Lock=1
    Trigger once
        Enemies Y>10
        Enemies locable=1
        Enemies locked=0
        For each Enemies
    [/code:8m3olk1i]
    
    Notice that I moved all picking conditions (Y>10, lockable=1, locked=0) before the For each loop. This reduces the number of instances that will be processed by the For each loop.
    
    Also I suggest using sub-events, they make the code better structured and easier to understand.
    
    In event 913 you don't really need the For each loop, you can remove it.
    
    Event 914:
    [code:8m3olk1i]
    Ctrl_Lock=1
        Enemies locked=0
        Enemies strength<25
        For each Enemies
           lockTarget UIDLink=Enemies.UID -> lockTarget  set frame to 1
    [/code:8m3olk1i]
    
    Event 915:
    [code:8m3olk1i]Enemies locked=1
    Enemies destroyed=1
    For each Enemies
           lockTarget UIDLink=Enemies.UID -> lockTarget  destroyed
    [/code:8m3olk1i]
  • This is not how this forum works.. Searching for bugs is your job, and if you don't know how fix them, then you post your questions here and someone will help you.

    Also, the link to your project file is broken. Try posting it without the "https://" part.