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

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.
Locked
User avatar
Core Essence
Neophyte Poster
Posts: 38
Joined: Tue Feb 07, 2006 10:40 am

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

Post 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
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post 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()
User avatar
Core Essence
Neophyte Poster
Posts: 38
Joined: Tue Feb 07, 2006 10:40 am

Post 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?
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

Im getting them even with targ.z if they are within the range of it.
User avatar
Core Essence
Neophyte Poster
Posts: 38
Joined: Tue Feb 07, 2006 10:40 am

Post 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
Locked