#1

Hi, I've just created a toll system, but the tolls are not opening when I do /opentoll.
Here's the code for one of the tolls:
Код:
TollData[tollBarriers][0] = CreateDynamicObject(968, 1738.59460, 530.57202, 27.36010,   0.00000, 90.00000, 160.36710);
This line should open the toll (set rot Y to 0 which will open it):
Код:
MoveObject(TollData[tollBarriers][0], 1738.59460, 530.57202, 27.36010, 2.0, 0.00000, 0.00000, 160.36710);
But the toll doesn't move at all, what am I doing wrong here? Basically I just copied and pasted the coordinates of the toll there and changed the rot Y to 0. I've never used MoveObject before though so I might be doing something wrong.
Reply
#2

I'm not very sure though, but to open the toll, You have to use the Z co-ordination.
Reply
#3

Quote:
Originally Posted by saffierr
Посмотреть сообщение
I'm not very sure though, but to open the toll, You have to use the Z co-ordination.
+1 , In my opinion too you have to use Z co-ordination
Reply
#4

No, it's Y. I tried that in map editor. Everytime I changed the rot Y to 0 it was opened and when I changed it back to 90 it was closed again. It doesn't matter as well because the object is not moving at all.
If I'd use SetObjectRot this way it would work, but I want it to move smoothy, but I've never used MoveObject before so I'm probably doing something wrong.
Reply
#5

I got it working when I added like 0.00001 to Z, but it's not moving smoothly. It's like SetObjectRot, it just sets the rotation without opening smoothly.
Reply
#6

Dynamic objects must be moved with MoveDynamicObject.
Reply
#7

If the object doesnt moves, you better change the object because that object doesnt supports move(ing) or you need to change point a with b like replacing something upside-down (i don't know how to explain that lol)...
Reply
#8

Quote:
Originally Posted by Vince
Посмотреть сообщение
Dynamic objects must be moved with MoveDynamicObject.
Yeah, that's a typo, I have them created with CreateObject.

Quote:
Originally Posted by ALiScripter
Посмотреть сообщение
If the object doesnt moves, you better change the object because that object doesnt supports move(ing) or you need to change point a with b like replacing something upside-down (i don't know how to explain that lol)...
But I have seen servers that have tolls moving like that.
Reply
#9

Quote:
Originally Posted by GoldenLion
Посмотреть сообщение
No, it's Y. I tried that in map editor. Everytime I changed the rot Y to 0 it was opened and when I changed it back to 90 it was closed again. It doesn't matter as well because the object is not moving at all.
If I'd use SetObjectRot this way it would work, but I want it to move smoothy, but I've never used MoveObject before so I'm probably doing something wrong.
In order for barriers (like SLPD barrier in single player) to move smoothly, you have to set the movement time to at least 0.05 otherwise the movement will be very fast making it look like SetObjectRot.
Reply
#10

Quote:
Originally Posted by Sjn
Посмотреть сообщение
In order for barriers (like SLPD barrier in single player) to move smoothly, you have to set the movement time to at least 0.05 otherwise the movement will be very fast making it look like SetObjectRot.
It's still like SetObjectRot. :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)