Page 1 of 1

[Pol 097 2006 10 29 RC Coregina] ListStaticsAtLocation();

Posted: Tue Nov 07, 2006 4:02 pm
by Core Essence
ListStaticsAtLocation() does not return any multi references, I tryed with this parms ListStaticsAtLocation( x, y, z, 0, who.realm); [where x, y, z are passed by target();], clicked on a multi and it didn't return nothing

Also ListStaticsNearLocation() doesn't work. Maybe ListStaticsInBox() too but I didn't checked it

Posted: Tue Nov 07, 2006 10:54 pm
by Austin
I just tested it and it printed out all the statics at the clicked XY position.

Code: Select all

use uo;
use os;

program StaticsTest(mobile)
	var targ := TargetCoordinates(mobile);

	if ( !targ )
		SendSysMessage(mobile, "Cancelled.");
		return 0;
	endif

	var statics := ListStaticsAtLocation(targ.x, targ.y, LIST_IGNORE_Z, 0, targ.realm);

	foreach static in ( statics )
		Print(_static_iter+". "+static);
		SleepMs(2);
	endforeach

	return 1;
endprogram
When you say 'multi reference' though do you mean access to the multi its self rather than the static items that form its shape?

If you want a multi object, you need to use function like ListMultisInBox()

Posted: Wed Nov 08, 2006 2:41 am
by Core Essence
Well, it returned an empty array, so no statics or multi at all... Maybe it's because I didn't used LIST_IGNORE_Z?

Posted: Wed Nov 08, 2006 8:59 pm
by Austin
Im getting them even with targ.z if they are within the range of it.

Posted: Sat Nov 11, 2006 8:49 am
by Core Essence
Checked it again and now seems to work... I don't have any idea what changed, but before it didn't work :/

You can lock the thread