SRL Archive - Reflection Discussion

Doors / Gates


Narcle

2010-11-16 13:42:07

So are they not apart of Objects anymore? Are they a separate thing? I tried finding them with objects but they aren't there so I'm assuming they are different.

Cstrike

2010-11-16 13:53:25

I've never personally tried finding Doors, I just get the ID and run it.
If it's not found, could the ID be wrong? Or if it's a blind find, it might be one of those things where they aren't specifically on a tile (and objects are possibly searched for by tiles only)?

pyroryan

2010-11-16 14:40:07

Its a WallObject so if you know the tile, use GetWallObjectAt

Bad Boy JH

2010-11-16 21:19:47

doors (usually) border 2 tiles, gates (usually) border 4. Which tile do we pick?

Actually I think each gate part is a seperate object.

pyroryan

2010-11-16 21:48:32

From: Bad Boy JH
doors (usually) border 2 tiles, gates (usually) border 4. Which tile do we pick?

Actually I think each gate part is a seperate object.


In front of the wallobject. Don't know if "front" is the right term so I'll explain.
For opening, stand so the door opens away from you and you're on the tile that borders the wallobject.
For closing, stand on the same side of the door as when you're opening it. If the door opens into a building, then you should be inside the building.
If its still not clear, I'll try to better explain it.

TomTuff

2010-11-16 22:30:37

say the gate/door is east-west faced. face the camera north (or south) and move the mouse to the tile the door blocks.

KillerTHC

2010-11-25 17:23:26

Just thought I would post the new version of cstrike's FindObjNear, this works for finding door ID's.

procedure FindObjNear;
var myObj, wallObj : TRSObject;
myTile, newTile : TTile;
i : Integer;
begin
if not LoggedIn then exit;
myTile := GetMyPos;
writeln ('[--Objects--]');
newTile := Tile((myTile.x-1),myTile.y);
MyObj := GetObjectAt(newTile, OBJECT_TYPE_INTERACTABLE);
WallObj := GetWallObjectAt(newTile);
if MyObj.ID > 0 then
begin
writeln ('(W)');
writeln ('ID: '+inttostr(MyObj.ID)+', Tile('+inttostr(MyObj.Tile.x)+','+inttostr(MyObj.Tile.y)+')');
end;
if WallObj.ID > 0 then
begin
writeln ('(W) WallObject');
writeln ('ID: '+inttostr(WallObj.ID)+', Tile('+inttostr(WallObj.Tile.x)+','+inttostr(WallObj.Tile.y)+')');
end;

newTile := Tile((myTile.x),myTile.y-1);
MyObj := GetObjectAt(newTile, OBJECT_TYPE_INTERACTABLE);
WallObj := GetWallObjectAt(newTile);
if MyObj.ID > 0 then
begin
writeln ('(S)');
writeln ('ID: '+inttostr(MyObj.ID)+', Tile('+inttostr(MyObj.Tile.x)+','+inttostr(MyObj.Tile.y)+')');
end;
if WallObj.ID > 0 then
begin
writeln ('(S) WallObject');
writeln ('ID: '+inttostr(WallObj.ID)+', Tile('+inttostr(WallObj.Tile.x)+','+inttostr(WallObj.Tile.y)+')');
end;

newTile := Tile((myTile.x+1),myTile.y);
MyObj := GetObjectAt(newTile, OBJECT_TYPE_INTERACTABLE);
WallObj := GetWallObjectAt(newTile);
if MyObj.ID > 0 then
begin
writeln ('(E)');
writeln ('ID: '+inttostr(MyObj.ID)+', Tile('+inttostr(MyObj.Tile.x)+','+inttostr(MyObj.Tile.y)+')');
end;
if WallObj.ID > 0 then
begin
writeln ('(E) WallObject');
writeln ('ID: '+inttostr(WallObj.ID)+', Tile('+inttostr(WallObj.Tile.x)+','+inttostr(WallObj.Tile.y)+')');
end;

newTile := Tile((myTile.x),myTile.y+1);
MyObj := GetObjectAt(newTile, OBJECT_TYPE_INTERACTABLE);
WallObj := GetWallObjectAt(newTile);
if MyObj.ID > 0 then
begin
writeln ('(N)');
writeln ('ID: '+inttostr(MyObj.ID)+', Tile('+inttostr(MyObj.Tile.x)+','+inttostr(MyObj.Tile.y)+')');
end;
if WallObj.ID > 0 then
begin
writeln ('(N) WallObject');
writeln ('ID: '+inttostr(WallObj.ID)+', Tile('+inttostr(WallObj.Tile.x)+','+inttostr(WallObj.Tile.y)+')');
end;

Wait(2000);
end;

Cstrike

2010-11-25 18:28:30

Nice modification! :)

One thing I might try and do is get a big debugger for the RS Screen