dop2000's Forum Posts

  • You can remove the period and convert to lowercase:

    lowercase(replace(Array.CurValue, ".", ""))

    If there are many such characters that you need to remove, it may be easier to use a local variable:

    set t to replace(Array.CurValue, ".", "")
    set t to replace(t, ",", "")
    set t to replace(t, ":", "")
    set t to replace(t, "!", "")
    set t to replace(t, "?", "")
    set t to lowercase(trim(t))
    

    Or use regexreplace()

  • You can use Keyboard event On 'Enter' Key pressed and On 'Tab' Key pressed.

    I don't know why it skips textboxes. You can add an instance variable ID, pick a textbox with (currentID+1) and set focus to it.

  • Is there a way to structure the game in such a way that I would be able to copy certain project files from one game to another without causing references to be broken?

    I think this is only possible if you clone a project. When you create an object with the same name in two different projects, they will have different internal IDs.

    You should be able to copy-paste event sheets between projects.

  • Using cos function is a great idea!

    I would do something like this:

    Set max speed to lerp(100, 200, abs(cos(MovingAngle)))

  • On tap -> Sprite set animation frame to (self.AnimationFrame+1)

  • You can compare Player.Pathfinding.MovingAngle, and if it's close to 90 or 270 degrees, decrease the maximum speed. If it's closer to t0 or 180 degrees - increase the max speed.

  • It's difficult to figure out and explain what happens when you invert both conditions, and when there are multiple enemies on the layout..

  • Since it's my demo, I'll explain.

    Please download this updated file:

    dropbox.com/s/jhje5xdqc5t2ahw/Forest2.capx

    Note, that all sprites have origin image point at the bottom.

    First, in event #1 all trees are z-sorted by their Y-position on the layout.

    On every tick I pick trees that are below the character on the layout. These trees will be green, all trees above will become grayscale.

    Then among the green trees I pick the bottom tree (on Z-axis). I may as well pick a tree with lowest Y-coordinate, it will be the same tree. This tree will start pulsating.

    And finally I move the character behind this tree.

  • No, don't do that. Use "Line of Sight" behavior.

    Player has Line Of Sight to Enemy ...........

    Or invert it to check if player doesn't see enemies.

  • Use newline expression.

    For example: Text Append newline & "New sentence"

  • You can only do this in NWJS export (for desktop).

    In HTLM5 export (for web) you can invoke download of the changed txt file, but you can't save it automatically without showing "Save as" dialog to user.

  • It will work for families, but you need to pass the same object/family UID you use in "On collision" event. If you have "On collision with stone", you need to pass stone.UID. If you have "On collision with RocksFamily", pass RockFamily.UID

  • It works if you pick item by UID. You can open browser console and check the messages:

    dropbox.com/s/ue2t2ajcgz77o25/MoonstoneIsland%280.0.0052%29.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The function looks fine. The mistake may be inside these events, or somewhere else. Have you tried running in Debug Mode?