SRL Archive - OSR Help

Interacting with Object Boundaries LAPE include?


Vowel

2015-04-01 14:31:29

I cannot for the LIFE OF ME, figure out how to locate an object boundary (fence, door, etc) on the screen and move the mouse to it to click.

Can someone PLEASE help?

3Garrett3

2015-04-01 14:43:04

We literally gave you about 3 ideas on IRC about 15 minutes before you posted this and @Turpinator; is currently helping you with TileToMS, did you need to post the thread asking for help while currently being helped?


Reflect.Mouse.Move(Reflect.TileToMS(Tile, Xoffset, Yoffset, Zoffset), XRandom, YRandom));

That's really all you need. Find the tile of the fence/door and then figure out the offset required to reliably click it.

Kyle

2015-04-01 14:47:30

As Garret said, you should already know this. I would suggest you try and learn on your own some before constantly making new threads.. Here's two ways without using TileToMS:


//Way 1
ObjArray.GetAll(ObjBoundary, 15);
for I := 0 to High(ObjArray) do
if ObjArray[I].IsOnMS then
begin
Reflect.Mouse.Move(ObjArray[I].GetMSPoint, 0, 0);
WriteLn(ObjArray[I].GetId);
Wait(500);
end;
//Way 2
if Obj.Find(ObjBoundary, 7056, 15) then
Reflect.Mouse.Move(Obj.GetMSPoint, 0, 0);

Since we don't use models, when using boundary objects they are on the edge of a tile, you may have to use TileToMS and use an offset..

Flight

2015-04-01 14:59:33

From: elfyyy

Since we don't use models…


This is off subject, but why?

Kyle

2015-04-01 15:02:20

From: Flight
This is off subject, but why?


It's difficult to use models with reflection in general, but is possible. Assuming you can invoke methods in SMART(you can't currently, but could be added easily) you still have to rotate and animate them manually. This takes a considerable amount of time, especially using simba with a single thread. It is possible to grab them from the cache, but you would still run into similar problems with having to animate them.

Flight

2015-04-01 15:12:29

From: elfyyy
It's difficult to use models with reflection in general, but is possible. Assuming you can invoke methods in SMART(you can't currently, but could be added easily) you still have to rotate and animate them manually. This takes a considerable amount of time, especially using simba with a single thread. It is possible to grab them from the cache, but you would still run into similar problems with having to animate them.


I remember we just started utilizing models in Reflection 2 shortly before the cluster flutter. If I'm not mistake it was iamadam who did a lot of the work for this. I'll try digging that up.

Kyle

2015-04-01 15:14:10

From: Flight
I remember we just started utilizing models in Reflection 2 shortly before the cluster flutter. If I'm not mistake it was iamadam who did a lot of the work for this. I'll try digging that up.


Nah, reflection 2 used model id's as just a different way of getting a unique ID from two objects with the same ID's

https://github.com/SRL/SRL-Reflection-2/search?utf8=%E2%9C%93&q=model

Flight

2015-04-01 15:23:26

From: elfyyy
Nah, reflection 2 used model id's as just a different way of getting a unique ID from two objects with the same ID's

https://github.com/SRL/SRL-Reflection-2/search?utf8=%E2%9C%93&q=model


Nope, those were composite IDs. Grabbing an object's model had to be done with node vertices, which the used X/Y and Z axis and were an independent hook, if I'm not mistaken. When I find what I'm looking for I'll post it here.

3Garrett3

2015-04-01 15:26:54

From: elfyyy
Nah, reflection 2 used model id's as just a different way of getting a unique ID from two objects with the same ID's

https://github.com/SRL/SRL-Reflection-2/search?utf8=%E2%9C%93&q=model


Does current reflection have this feature? It would make a few things easier, like tracking objects. Player animation works alright but object tracking would be faster (ie someone chops a tree down and you swing your axe for a while before the animation stops).

Kyle

2015-04-01 15:36:09

From: 3Garrett3
Does current reflection have this feature? It would make a few things easier, like tracking objects. Player animation works alright but object tracking would be faster (ie someone chops a tree down and you swing your axe for a while before the animation stops).


Nah, I suppose I could add it though. But in your case just check to see when the object at the specific tile disapears