Array condition, check all states of x position in array?.

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hello everyone! I'm sure its pretty basic stuff but, quick question: How would I go about checking every state in an arrays X dimension ?

    So I want to know if ANY state of X offset is 1. Do I make some kind of fastloop to check every state?

    For example: ValueAtX( "inventoryArray", >Enter X offset< ) = 1

    Where the "x offset" could be any value.

    Thanks in advance.

    Please login to see this picture.

  • Use a fastloop. The number of loops it runs is however many columns you have in your array. Your X Offset number in the expression would be your fastloop index number. If you find a cell equals 1, you can manually stop the fastloop.

    Custom A* Pathfinding in MMF2: Please login to see this link.
    Random Tile World Generation: Please login to see this link.

  • Thanks for the advice guys! I was scratching my head for a condition to do this without the fast loop for too long.

    Im using it to check for a certain tile type when loading a level. And make it mark 2 tiles with a specific out come.

    Please login to see this picture.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!