SRL Archive - Reflection Development

R_SetFightMode


Infantry001

2009-07-03 02:59:16

Instead of the modes being 0-3, why not change it to 1-4? That's what SRL uses, and it confused the heck out of me when I tried to implement it XD

ian.

2009-07-03 03:07:32

SCAR counts starting from 0 instead of 1. It always has, so there's no reason to change it for one thing (DropItem is the only thing that starts with 1 instead of 0 I think).

Infantry001

2009-07-03 06:43:47

It uses a case anyways - no arrays or anything, therefore, no need to start at one.

case Mode of
0: b := IntToBox(575, 255, 630, 290);
1: b := IntToBox(660, 255, 710, 290);
2: b := IntToBox(575, 310, 630, 345);
3: b := IntToBox(660, 310, 710, 345);
else Exit;
end;

ZephyrsFury

2009-07-03 07:04:25

From: 99_ aka ian.
SCAR counts starting from 0 instead of 1. It always has, so there's no reason to change it for one thing (DropItem is the only thing that starts with 1 instead of 0 I think).


Its probably good practice to start number sequences from 0 but a lot of older SRL functions have it starting at 1 so I usually like to keep that format too.

ian.

2009-07-03 08:03:03

From: ZephyrsFury
Its probably good practice to start number sequences from 0 but a lot of older SRL functions have it starting at 1 so I usually like to keep that format too.


That's what I meant, as the newer revisions will (hopefully) be all counting from 0 (or 1, I guess.. :/) so that it's not confusing (some starting at one and some starting at zero).