Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5883 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

I am making a database program to automate game turns for a proportional movement game system, and cannot figure how to have FM sort the units moving each turn. Each record is a different unit, saving the unit's speed, information, etc.

There are 32 separate moves per turn, with some, none, or all of the units moving during each of the 32 segments. Whether a unit moves depends on its speed, i.e., something moving Speed 32 will move each segment, something moving Speed 16 will move every other segment, something moving Speed 4 will move every eighth segment, etc. I have it set up by a separate field for Segment 1, Segment 2, etc., to calculate whether a unit moves that segement based on its current speed. Each segment, though, the slowest unit will move first, followed by the second slowest, etc.

After determining which units move in that segment, what I am looking to do is output a list of the units ***in the order that they move*** (slowest to fastest). Therein is my problem. They are already in the database and a simple sort doesn't work (or I can't get it to work). A summary field doesn't work either as I need to keep it out of Preview Mode so I can maintain interaction with the fields. Can anyone help with a function, string, relation, solution, approach, etc., that can perform this?

Posted

If as you say each record is a unit and includes the unit's speed, what is the difficulty in sorting the unit table by speed? Please be more specific than "doesn't work."

  • Newbies
Posted

Ok, here's more specific info. Each unit is a separate record. A field in each record has the unit's speed. From there, there is a field for Segments 1-32 that is a calculation that figures out if the unit moves on that segment or not, based on the units speed. Different units moving at different speeds will result in, for example, units 2, 4 and 5 moving on segment 5, units 2 and 5 moving on segment 6, units 1 and 4 moving on segment 7, and units 1, 2 and 5 moving on segment 8, etc. Therefore, I have a different list of units moving each segment.

What I want to do is have a one page list of all segments, showing who moves in what segment and in what order they move. To do that, I need to calculate in one field which units move, and which unit moves first. Therefore, I will end up with 32 global calculation fields with a text result that shows which units move, and in what order.

Does this help?

Thanks in advance .....

Posted

It sounds like segments should really be a separate table.

This topic is 5883 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.