Move Object.
#1

So, I imagine an object moving at headquarters, And i have a many problems here.
1. I open it, he flees to a distant place and stops
Two. I close it is back but he bends a little.
3. I close it, it does not come back at all.
4. How do I do that I would just open it, and he will own .

Code :
Quote:

if(strcmp(cmdtext, "/Open" ,true)==0)
{
MoveObject(gate, 980, 1766.9000244141, 2730.1000976563, 12.60000038147, 1, 0, 0, 0);
return 1;
}

if(strcmp(cmdtext, "/Close" ,true)==0)
{
MoveObject(gate, 1766.9000244141, 2730.1000976563, 6.30000038147, 1, 0, 0, 0);
return 1;
}

Reply
#2

Remove the last three 0's ( 0, 0, 0)

If you don't mean to turn the object you can leave these variables away
This might fix your problem
Reply
#3

Код:
MoveObject(gate, 980, 1766.9000244141, 2730.1000976563, 12.60000038147, 1, 0, 0, 0);
MoveObject(gate, 1766.9000244141, 2730.1000976563, 6.30000038147, 1, 0, 0, 0);
these seems a little bit to far away from each other don't they, that's maybe why it floats far far away, get the right cordiantes and it should fix.
Reply
#4

its work !
But, why in /Open its run so fast and in close its slow ? the speed of them is same , "1"
and if i dont do /Close , its run's away..and dont stoping
Reply
#5

Read what Ranama said. Clearly you have a WRONG parameter there.

Perhaps you don't understand, let me write it out to you:
If you use /open, the gate will move to coordinates 980, 1766.9000244141, 2730.1000976563 with the speed of 12.60000038147
If you use /close, the gate will move to coordinates 1766.9000244141, 2730.1000976563, 6.30000038147 with the speed of 1

As someone said, the coordinates are NOT close to eachother. You are better off re-doing the coordinates.
Reply
#6

Ok , i Remove it (the 980) and this is now not work :/
i Mean , The Gate Not Moveing .. !
What To Do ??:PP
Reply
#7

OMG,Ranama did not mean to remove the X coordinate or Y coordinate,but to modify it and change it,like a closer and better correspondent for the X coordinate 980 would be Y 1000,and not Y 1280,but YOU CANNOT TELL this,this is just an example,don't change the Y coordinate to 1000,but use a map-editor and save the proper coordinates.
Reply


Forum Jump:


Users browsing this thread: