SRL Archive - MSI Archives

How to use MSI Obstacles?


Troll

2011-08-16 16:59:32

Ok so i have made the records but when making the script im not sure how to sure how to use them, i need to walk a path, click the alter (obstacle) then thats the end of the path no more walking. Then i need to click the portal then walk the path so how would i do that?

Frement

2011-08-16 17:02:32

Couldn't you check the guild miner for instructions?

Troll

2011-08-16 17:05:18

I did but im still not sure

Frement

2011-08-16 17:10:15

Well, you need to add a record to "Obstacles.simba".

Example:
    OBS_LADDER_MG_DOWN:
with result do
begin
Name := 'OBS_LADDER_MG_DOWN';
ObjConst := LADDER_MG_DOWN;
ObjMir := LADDER_MG_UP;
ObjMirArea := intToBox(MSCX - 85, MSCY - 85, MSCX + 85, MSCY + 85);
Camera := ['n', true];

// West, South, East, North
EndTiles := [Point(3017, 9739), Point(3019, 9737),
Point(3021, 9739), Point(3019, 9741)];
end;

OBS_LADDER_MG_UP:
with result do
begin
Name := 'OBS_LADDER_MG_UP';
ObjConst := LADDER_MG_UP;
ObjMir := LADDER_MG_DOWN;
ObjMirArea := intToBox(MSCX - 85, MSCY - 85, MSCX + 85, MSCY + 85);
Camera := ['n', true];

// West, South, East, North
EndTiles := [Point(3017, 3339), Point(3019, 3337),
Point(3021, 3339), Point(3019, 3341)];
end;

Just make one for the altar, and one for the portal (If there is a portal on the other side?)

Troll

2011-08-16 17:13:40

Yeah, ive done that i didnt explain very well. (trying to watch british fire works champion ship out the window) but i have everything like that set up. Im trying to put it in the TScript i think its called

Frement

2011-08-16 17:42:31

            Reflection := [
// Bank -> Ladder Down
TPointArray([Point(3012, 3355), Point(3023, 3352),
Point(3030, 3340), Point(3021, 3339)]),

// Ladder Up -> In Mine
TPointArray([Point(3021, 9739), Point(3033, 9738),
Point(3042, 9737)])
];
// SPS doesn't currently support dungeons
{
SPSAreas := [''];
Color := [];
}
Obstacles[OBS_LOC_TO] := [OBS_LADDER_MG_DOWN];
Obstacles[OBS_LOC_FROM] := [OBS_LADDER_MG_UP];

That should be pretty self-explanatory?

OBS_LOC_TO is the altar, and OBS_LOC_FROM is the portal. And you see that the path has 2 TPA's, I guess (As I don't know for sure) that it walks the first path, searches the obstacle, then walks the second, and in reverse, it uses the OBS_LOC_FROM obstacle in the middle.

Troll

2011-08-16 17:45:12

Yeah now that im fully looking and using my brain for once i think i get it, so if there is no walk path after the obstacle do you think i just do

TPointArray([])

for the secound half?

Frement

2011-08-16 17:50:34

Or just leave it empty I guess, I have no idea, I'll look into the walking procedures.

EDIT: Well I don't see why you would need the second TPointArray([]), just use one. If it fails, then add the second.

Coh3n

2011-08-17 02:08:13

From: Troll
Yeah now that im fully looking and using my brain for once i think i get it, so if there is no walk path after the obstacle do you think i just do

TPointArray([])

for the secound half?

You should have two points in the second half, just in case (unless the alter is literally right beside the player). I know for some alters you have to walk a couple points. Minimum, you should have a point in the path for the portal and a point for alter.

Also, everything Frement has said is correct. You don't have to call any of the walking/obstacle procedures at all - it's all done automatically depending on the TScript record.