[server]xml Help

Started by KAKAN, Feb 07, 2016, 05:18 PM

Previous topic - Next topic

KAKAN

I need to make about 2-3 objects into a map so people don't fall through them when they teleport. I don't quite understand how the angles work in XML would really appreciate if you could help me convert this:
CreateObject(1083,0,Vector(-34.6886, 1763.63, 32.1387),255).RotateToEuler(Vector(0, 0, -1.56),1); // House

into XML or just tell me how the angles will look in the XML.

I tried this:-
<?xml version="1.0" encoding="ASCII" ?>
        <itemlist>
                        <item model="183" name="NUb :P">
                        <position x="-34.6886" y="1763.63" z="32.1387" />
                        <rotation format="axisangle" x="0" y="0" z="-1.56" angle="1" />
                </item>
        </itemlist>
Didn't work. Can someone tell me the mistake I did?
oh no

Xmair

You used 183 instead of 1083 in the xml version.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

KAKAN

Quote from: Xmair on Feb 08, 2016, 10:08 AMYou used 183 instead of 1083 in the xml version.
Fixed that. doesn't work.
oh no

Xmair

Your code:
<?xml version="1.0" encoding="ASCII" ?>
        <itemlist>
                        <item model="183" name="NUb :P">
                        <position x="-34.6886" y="1763.63" z="32.1387" />
                        <rotation format="axisangle" x="0" y="0" z="-1.56" angle="1" />
                </item>
        </itemlist>
Fix:
<?xml version="1.0" encoding="ASCII" ?>
        <itemlist>
                        <item model="1083" name="NUb?"/>
                        <position x="-34.6886" y="1763.63" z="32.1387" />
                        <rotation format="axisangle" x="0" y="0" z="-1.56" angle="1" />
                </item>
        </itemlist>
Untested.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Thijn

Do you even read @Xmair
You can clearly see your so called fix breaks the XML. That item node actually ends below. It's just not properly formatted..

Xmair

Just forgot that since I don't xml much.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Thijn

local obj = CreateObject(1083,0,Vector(-34.6886, 1763.63, 32.1387),255);
obj.RotateToEuler(Vector(0, 0, -1.56),0);
print( obj.Rotation );
Output: (0, 0, -0.703279, 0.710914)

XML:
<?xml version="1.0" encoding="ASCII" ?>
<itemlist>
<item model="1083" name="Home">
<position x="-34.6886" y="1763.63" z="32.1387" />
<rotation format="axisangle" x="0" y="0" z="-0.703279" angle="-0.710914" />
</item>
</itemlist>
(Yes the positive to negative on the angle attribute is intended.)

Untested.