SRL Archive - MSI Bugs

MSI Flag Function


TomTuff

2011-01-11 22:34:15

I'm running the Draynor willow cutter. When the player enters the bank, it finds the colors before the player completely stops moving, so when it goes through the ATPA it got bad uptext. Whatever flag function MSI uses needs to be changed a bit maybe.

NCDS

2011-01-11 22:50:09

If you want in Globals you can change TOLERANCE_FLAG to a lower number for now. It tell the script how far away from the flag it is allowed to move onto the next thing. That's the only thing that makes it move on before it has finished moving completely, otherwise it relies just as heavily on IsMoving as FlagPresent.

I can try and change somethings around tomorrow, but I've got to get to bed.

Coh3n

2011-01-12 01:01:41

What if we added a parameter to MSI_Flag (I want to change it to return a boolean also) to determine whether or not to wait until the player is moving?

function MSI_Flag(StopMoving: Boolean): Boolean;

// Then call this when it's the last tile in a path
MSI_Flag(True);
Could work, any other ideas?

TomTuff

2011-01-12 01:19:40

Instead of a boolean, an Integer. for example, 3 or 4 would work for most paths, but you want it to be 0 when you enter a building. (i'm just assuming the tolerance = flagD)

Coh3n

2011-01-12 01:27:05

From: TomTuff
Instead of a boolean, an Integer. for example, 3 or 4 would work for most paths, but you want it to be 0 when you enter a building. (i'm just assuming the tolerance = flagD)

Yes, it should actually be renamed to FLAG_DISTANCE rather than FLAG_TOLERANCE, and yes, I think an integer would work well. I'll fix this right now for you. :)

E: Committed and tested. Should be a lot better for you. :)

TomTuff

2011-01-12 02:02:37

Will i still have to change FLAG_TOLERANCE myself, or does it vary per function automatically?

I'm going to assume the latter of the 2. I'm starting my player now, I'll tell you if i think you fixed it tomorrow. Thanks :)

Coh3n

2011-01-12 02:04:54

From: TomTuff
Will i still have to change FLAG_TOLERANCE myself, or does it vary per function automatically?

I'm going to assume the latter of the 2. I'm starting my player now, I'll tell you if i think you fixed it tomorrow. Thanks :)

I changed it to FLAG_DISTANCE. ;) And no, you shouldn't have to change it yourself with the latest version. MSI_Flag(0) is called on the last point in a path (i.e. the one going into the bank or trees).

TomTuff

2011-01-12 02:05:28

From: Coh3n
I changed it to FLAG_DISTANCE. ;) And no, you shouldn't have to change it yourself with the latest version. MSI_Flag(0) is called on the last point in a path (i.e. the one going into the bank or trees).


Awesome, that's how i would have done it myself :D