Minor's Recent Forum Activity

  • You'll need to use the RIGHT expression under "System Expressions - Text

    [attachment=0:2jwgh00p][/attachment:2jwgh00p]

  • The wonderful rexrainbow has made a plugin to load levels created in tiled.

    https://www.scirra.com/forum/plugin-rex-tmx-importer-v2_t103854?&hilit=tiled

    Never used it myself but as long as you know which tiles in Tiled should use the 2nd tilemap it should just be a case of looping through the Tiled export file using the plugin and placing the correct tiles from the correct tilemap.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think I'm done with this at the moment.

    It just seems too counter productive to try and code around 1 tilemap it's almost like redoing C2's excellent built in Platform behaviour in events. It would probably work better if I used a state machine & imagepoints. I probably could get it to work better but like I said it's like re-inventing the wheel.

    Here's were I got to:

      Conveyor left & right Spring Jump thru and drop through platform (sign in tilemap) Ladder (only up -

      Biggest bug is move off the ladder then back on while falling and you'll go through the solid floor

      )

    [attachment=0:3409nimm][/attachment:3409nimm]

    I would definitely go with multiple tilemaps it would be much easier.

  • I think multiple tilemaps is the way to go.

    I carried on with my last example I made and did get "jump thru" sort of working with 1 tilemap but it really isn't worth the extra events to make it work. Don't know how you are building the levels whether inside C2 or Tiled but either should be easy to do with 2 or more tilemaps.

    **EDIT

    Playing around some more I'm starting to get better results with just 1 tilemap. I'll post the capx when I'm happy everything is working as it should.

  • Not exactly sure what you are asking but

    loopindex("j")

    &

    loopindex("i")

    will return the current value of

    i

    &

    j

    inside the loop.

  • I carried on messing with my example and added very basic platform logic to the tile checking.

    Added a spring - Up arrow on tilemap

    Added conveyor left & right - left & right arrow on tilemap (this needs a bit more thought to it to make it work correctly i.e you stop before falling off the edge due to tile checks)

    [attachment=0:2q1licm5][/attachment:2q1licm5]

  • Here's an example of getting the tile information around the player in a platform game.

    [attachment=0:1odsqu5f][/attachment:1odsqu5f]

  • Here's a quick example.

    [attachment=0:ls7tsj89][/attachment:ls7tsj89]

  • The "regenerate obstacle map" action is under the object that has the "pathfinding behaviour". So if your object that has "pathfinding behaviour" is "enemy" double click it and scroll down until you find the "pathfinding" sub-heading.

    [attachment=0:3lcpcrdj][/attachment:3lcpcrdj]

    You'll probably need to put this action in the event for adding a new turret to the map.

  • I'm guessing you haven't recalculated the path finding map (regenerate obstacle map) after a new turret has been spawned/placed.

  • why you need to compare mid(pattern, loopindex("x"), 1) with "1" ?

    To find out if I need to create a coin or not. A 0 in the string is air/nothing while a 1 is a coin.

    If you are asking why I'm checking for

    "1"

    rather than

    1

    then that's because the information in the "pattern" variable is stored as a "string/text" and not an integer/number. So if you checked for 1 it would never be true.

    You could of course change it to int(mid(pattern, loopindex("x"), 1)) with 1 and covert the string to an integer.

  • Well done Minor !

    I did not expect someone to make an example...without using arrays

    Why thank you.

    Arrays would be much easier. Some people have trouble with them, although string manipulation is much more of a pain to work with.

    I carried on playing and created a "Text to Coin" converter thingy.

    Need a better font and could also make it so I can save the coin pattern/text as JSON to load into an array.

Minor's avatar

Minor

Member since 24 Jul, 2009

None one is following Minor yet!

Connect with Minor

Trophy Case

  • 15-Year Club

Progress

15/44
How to earn trophies