SphereCommunity
how to change the item position using foritems? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: how to change the item position using foritems? (/Thread-how-to-change-the-item-position-using-foritems)



how to change the item position using foritems? - jexnico - 05-20-2021 05:37 AM

Good afternoon people

I have several decorative items on my server that are below the map (p.z), i have been burning neurons for 2 days trying to raise them all at once with a fix but everything i do does not work

Could someone help me and tell me what am i doing wrong?

I'm noob and this is the script that i'm trying to create

[FUNCTION f_change_pz]
foritems 50
if (<type> == t_tree)
if (<p.z> != <p.terrain.z>)
new.p=<eval <SERV.MAP(<P.X>,<P.Y>,<P.M>).TERRAIN.Z>+6>
new.update
ENDIF
ENDIF
ENDFOR
serv.b check!


RE: how to change the item position using foritems? - golfin - 05-20-2021 02:07 PM

This topic has already been addressed, see here: https://forum.spherecommunity.net/Thread-Fixing-wrong-Z-position?highlight=Fix_Z


RE: how to change the item position using foritems? - jexnico - 05-20-2021 08:51 PM

lol, thanks