SRL Archive - Reflection Help

How to check for tree existance


Sir R. M8gic1an

2011-01-13 21:36:28

Hey guys, I've never really used reflection before and I just wanted to ask a quick question that wouldn't come on a tut :p


I want to check if a tree is 'alive', and quite possibly I'll want to check it outside of the MS and maybe even outside of the MM.

Is that possible?

And how do I check for rocks with ore on my MS ?

~RM

Method

2011-01-13 21:42:05

Trees and stumps have different ids, as do rocks with ore and rocks without ore.

If the objects are in your loaded region, you should be able to find them even if they aren't in your viewing region (but you should check just to be sure).

mormonman

2011-01-13 23:09:07

From: Method
If the objects are in your loaded region, you should be able to find them even if they aren't in your viewing region (but you should check just to be sure).


Yes, it loads the 104x104 region and you can go through every object in that region, it is just really slow.

kitchenrange

2011-01-13 23:12:10

Yeah, unless you are cutting yews it would be better to find all of them and only go through so many of them before cutting it off. Otherwise, you will be walking to trees farther away just as they spawn immediately next to you.

Sir R. M8gic1an

2011-01-14 09:35:54

Is there are object property to check when they respawn? That'd be perfect..

~RM

kitchenrange

2011-01-14 11:13:33

I don't think there is anything like that. Just do a few quick checks of the first few objects it finds, and cut it off. If it doesn't find them by then, let it go to the top of the array of objects to walk to them.

Troll

2011-01-14 11:23:02

From: Sir R. Magician
Is there are object property to check when they respawn? That'd be perfect..

~RM


Dont think so but i saw somewhere some saying it was on wiki how to work it out, so if you time when you finished it then use reflection to see how many poeple in the world ( if you can ) and then you could be able to i think :p