Open Steinny opened 2 months ago
Because you are using it wrongly, t_multi is become a region after you placed the house, so basically you are trying to get REGION of the REGION? It makes no sense. If you want to save any variable to the region, you need to use REGION.TAG on real region, not the house itself. Or if you want to save a tag on house, you need to use TAG.FORSALE directly instead of calling the region.
For example if you want to add TAG.FORSALE for house multi, you need to use
REF1=<REGION.UID>
REF1.TAG.FORSALE = 1
then if you want to read it you need to use
REF1=<REGION.UID>
SYSMESSAGE <REF1.TAG.FORSALE>
But
REF1=<REGION.UID>
REF1.REGION.TAG.FORSALE = 1
Basically in code, you are trying to do it in this way, even if you try to check t_multi's region with REGION.ISITEM you will see it will return as "1", while normal REGION never gives an answer for it. If you want to put a tag on t_multi, just use TAG.FORSALE not REGION.TAG.blabla. Or if you want to place a tag on the region, you need to get real region from multi which returns "Mainland (Wizard Tower)" and put the tag on it, there are so many ways to get it, it depends on you to choose which way to use.
in my defense, I will say that I study the scripts that come with the sphere X. and I asked this question in discord
Honestly I don't remember how was it in older version of sphere but as I remember it was always like this, maybe I misremember but it can be script-side issue, or we may set region of the multi as a main region, so region could be used on multi.
I agree with this logic in scripts, but not when I do it manually in the game.
I've already sent a fix for it, it seems like REGION reference missed for multis so with a pr build it should work fine.
im use command ".xregion.tag.forsale = 1" on t_multi of house .xshow region.tag.forsale return 0
im use command ".region.tag.forsale = 1" in house area .show region.tag.forsale return 1
.xshow region.uid and .show region.uid return equal
.xshow region.name return "name" of t_multi .show region.name return "name of region (name of t_multi)" like Mainland (Wizard Tower) i dont know why this work like that
in sphere ini AreaFlags=02
and i checked if i do .region.tag.forsale = 1 in taglist on t_multi tag.forsale does not appear
and another wish when command .region.tag.forsale sphere server should send a reply message