Page 1 of 1

How can I test whether x, y, z, realm is inside a multi?

Posted: Thu Oct 12, 2017 10:13 pm
by Yukiko
The way I've always seen this done is by moving an invisible item, usually a gold coin, to the location in question. Then testing the object for the multi member, ie. object.multi.

Is there a better way to do this?

I thought there was but I can't remember it.

It would be handy to have a Core function to do this check. Something like IsLocationInAMulti(x, y, z, realm)
Return values: 0=no, 1=yes, and error-Location not valid for the realm, error-Invalid realm parameter.

Something like that.

Re: How can I test whether x, y, z, realm is inside a multi?

Posted: Fri Oct 13, 2017 12:18 am
by DevGIB

Re: How can I test whether x, y, z, realm is inside a multi?

Posted: Fri Oct 13, 2017 7:12 am
by Turley
Yes that's exactly the function you should use:
Var ismultiloc:=listmultisinbox(x,y,z,x,y,z,realm).size()>0;

Re: How can I test whether x, y, z, realm is inside a multi?

Posted: Fri Oct 13, 2017 8:43 am
by Yukiko
Just set both sets of coordinates to the same x, y, and z like Dev and I discussed on Discord. Sounds good to me. Thanks guys.