Minor's Recent Forum Activity

  • No problem I find it's the best method for this type of movement. Phealin was having trouble recreating it from your description and I was just trying to save him the trouble, since he would have just ended with the same thing as my example.

  • Just to say when you have added my version to your game and it doesn't work. Don't have your player as a solid or it will never pass through a 32x32 gap as Construct will register a collision.

    Oh and quick note that EightBitBattleCat's way of doing roguelike movement is almost exactly as I did it in the example.

  • Not sure what the problem is but using text works so you have overlooked something.

    Did you add the instance variable as a "string" since "score1" is not a number if you use =score1 and add the instance variable as a number it won't be equal.

    A version working using "score1" as a variable.

    [attachment=0:29ykiom3][/attachment:29ykiom3]

  • Here is an quick example of basic roguelike type movement.

    [attachment=1:2uyephwu][/attachment:2uyephwu]

    If you'd like to constantly move by a grid square while the key is "down" here is an example of that too

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

  • Yes it will you'll need to use "set frame" and in the box use choose(0,1,2,3,4) remember animation frames start at "0".

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

  • With so few different frames you could use choose(1,2,3,4,5) that will choose one of the numbers at random for you.

  • In the Construct 2 sprite editor click your animation usually named "default" by default and set the speed to 0 think it's usually 5.

    When you set the frame to 3 for example it will play from there up to frame 5.

  • Just taking a quick guess but are you sprites 16x16?

    If so just try changing the offset check to Hero.X + 8 and see if that works.

  • I've made 2 examples because you're sort of describing 2 different things. I know English isn't your first language so no problem.

    In your description you are finding the first position with a value of 0. Don't forget Arrays are "0" based so the 1st element in an array is "0" not "1".

    So in your example 1,2,1,3,5,0,0,0 the first value of "0" would be "5".

    [attachment=1:2cke3x09][/attachment:2cke3x09]

    If you did want to find the last/highest element of "0" in the array so 1,2,1,3,5,0,0,0 it would be "7".

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

  • Here is an example of how you can find the highest, lowest, total & average value of an array. Numbers are between 0-5 but are decimal you can easily change it to use whole numbers.

    [attachment=0:194m4a3r][/attachment:194m4a3r]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes it's possible. You'd use something like -

    Sprite on clicked > Goto Layout (by name) > and then in the box use "Layout "&round(random(0,10))

    Or if you have changed your Layout names to something specific to your game, such as level names you could use the "choose" expression so:

    Sprite on clicked > Goto Layout (by name) > and then in the box use choose(emerald hills,underwater caverns,the end,the nether) this will randomly pick 1 value from the comma separated list.

    It just depends on how you have named your Layouts.

  • Thanks for giving it a try

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