Moving objects
#1

Hi,

I'm testing some stuff for moving objects with a dozer vehicle.
I've created some rocks and I can move them by pushing them away with the dozer, but when I try to get the rock's current position, it returns the location where it was created and not where it is being pushed to.

Can anyone help me with this?

pawn Код:
// Get the current position of the rock as it might have been moved by the player already
    GetObjectPos(RockID, Rockx, Rocky, Rockz);
    format(Msg, 128, "RockX = %f, RockY = %f, RockZ = %f", Rockx, Rocky, Rockz);
    SendClientMessage(playerid, 0xFFFFFFFF, Msg);
This code is used in a timer that runs every second.
It always sends me the coordinates where the rock has been created, instead of giving me the current position of the rock where I pushed it.
Reply
#2

Bump. This is a bug, and needs to be fixed!
Reply
#3

Quote:
Originally Posted by wups
Посмотреть сообщение
Bump. This is a bug, and needs to be fixed!
This is not a bug, but how SA works.

When you push an object, it's only pushed for you. If another player comes by he will see the object at the original position. It is also shown at the original position if you come back at some later time (after it's respawned). You can only move objects using Move(Player)Object functions.
Reply
#4

Quote:
Originally Posted by Sergei
Посмотреть сообщение
This is not a bug, but how SA works.

When you push an object, it's only pushed for you. If another player comes by he will see the object at the original position. It is also shown at the original position if you come back at some later time (after it's respawned). You can only move objects using Move(Player)Object functions.
Well that's called a SYNC BUG.
Reply
#5

its not a sync bug. if a player is streamed in while youre pushing any object, then he will see it too coz the game physics gets applied on his screen aswell. its like spawning 100 barrels, moving/destroying them, then go away and back. they will restream on their initial position.
Reply
#6

Quote:
Originally Posted by Babul
Посмотреть сообщение
its not a sync bug. if a player is streamed in while youre pushing any object, then he will see it too coz the game physics gets applied on his screen aswell. its like spawning 100 barrels, moving/destroying them, then go away and back. they will restream on their initial position.
I'm talking about GetObjectPos.
Reply
#7

And I was about to remake the gtaa quarry missions.. wow thanks for the heads up! this should be moved to the bugs section...
Reply
#8

iam talking about the same. objects. it wont work. i tried to get an objects position after it changed in position or fell down - it will return the position where the object got created. thats why even destroyed barrels/haystacks can still get moved, you wont see it. then restream them, and theyre where you moved them to.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)