Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: MatheuS on Dec 13, 2014, 10:22 PM

Title: [DOUBT] How to get the coordinates
Post by: MatheuS on Dec 13, 2014, 10:22 PM
I wonder how can I get the coordinates for the function CreateObject.

When I use a map editor to get the coordinates they are wrong.
Title: Re: [DOUBT] How to get the coordinates
Post by: . on Dec 13, 2014, 10:57 PM
What map editor and what coordinates do you get? you just need to get the X, Y, Z position. (position not rotation). And be sure you get them in the right order.

Also what is the result? The object is placed at a different position. The object is not visible at all? The object isn't created at all? etc.
Title: Re: [DOUBT] How to get the coordinates
Post by: MatheuS on Dec 13, 2014, 11:09 PM
Quote from: S.L.C on Dec 13, 2014, 10:57 PMWhat map editor and what coordinates do you get? you just need to get the X, Y, Z position. (position not rotation). And be sure you get them in the right order.

Also what is the result? The object is placed at a different position. The object is not visible at all? The object isn't created at all? etc.

The object is placed at a different position.
Title: Re: [DOUBT] How to get the coordinates
Post by: Honey on Dec 14, 2014, 10:17 AM
If you use MEd than you should stop using it because it gives wrong direction. Try using Moo Mapper or KEd( untested )
Title: Re: [DOUBT] How to get the coordinates
Post by: Sebastian on Dec 14, 2014, 11:36 AM
I'm using KEd since NC told me about it.
KEd is better because it saves the correct rotation, not like MooMapper.

After that, you have to convert the .ipl to .xml / CreateObject.
Title: Re: [DOUBT] How to get the coordinates
Post by: Thijn on Dec 14, 2014, 02:40 PM
Quote from: sseebbyy on Dec 14, 2014, 11:36 AMAfter that, you have to convert the .ipl to .xml / CreateObject.
For which you can use this little tool (http://thijn.minelord.com/vcmp/iplConvert/).
Title: Re: [DOUBT] How to get the coordinates
Post by: MatheuS on Dec 18, 2014, 06:17 AM
I am doing what you speak is still is incorrect :-\

I'm using KED Editor...


Code:

CreateObject( 1395, 0, Vector(396.41, -472.947, 13.5824), 255).RotateTo( Quaternion(0, 0, -0.422618, 0.906308), 0 );
XML:

<?xml version="1.0" encoding="ASCII" ?>
<itemlist>
<item model="1395" name="">
<position x="396.41" y="-472.947" z="13.5824" />
<rotation format="axisangle" x="0" y="0" z="-0.422618" angle="0.906308" />
</item>
</itemlist>

Title: Re: [DOUBT] How to get the coordinates
Post by: aXXo on Jan 10, 2015, 04:50 AM
Not sure if this is already known, but I'll post anyway since I experienced the same problem.

Apparently the negative rotation values from KEd are comprehended incorrectly by VCMP.
If you remove the negative sign, you will get the expected result.

There you go:
CreateObject( 1395, 0, Vector(396.41, -472.947, 13.5824), 255).RotateTo( Quaternion(0, 0, 0.422618, 0.906308), 0 );

If Thijn could modify the tool to ignore the negation, it would be the perfect copy-pasta :)

Title: Re: [DOUBT] How to get the coordinates
Post by: MatheuS on Jan 10, 2015, 06:52 PM
Quote from: aXXo on Jan 10, 2015, 04:50 AMNot sure if this is already known, but I'll post anyway since I experienced the same problem.

Apparently the negative rotation values from KEd are comprehended incorrectly by VCMP.
If you remove the negative sign, you will get the expected result.

There you go:
CreateObject( 1395, 0, Vector(396.41, -472.947, 13.5824), 255).RotateTo( Quaternion(0, 0, 0.422618, 0.906308), 0 );

If Thijn could modify the tool to ignore the negation, it would be the perfect copy-pasta :)



Thank's ^^
Title: Re: [DOUBT] How to get the coordinates
Post by: Thijn on Jan 15, 2015, 06:44 PM
Quote from: aXXo on Jan 10, 2015, 04:50 AMIf Thijn could modify the tool to ignore the negation, it would be the perfect copy-pasta :)
Done :)