bindentity problem for boards (trick solution)

White Dragon

New member
PROBLEM:
To make a surf board for an entity I use changeentityproperty(self,"position",x,z,NULL());
but if I use bindentity(self,parent,x_relative,z_relative,NULL()) altitude is setted to 0 always (relative value).
This is an engine BUG.
The problem is the asynchronous movements. WHY? Because the engine updates entity A in a frame and entity B in another (or same) frame. But if the engine renders A before or after B, the movements are async.
The real solution would be to make bindentity(self,parent,x_relative,z_relative,NULL()) working (bindentity updates all concurrently).
When the problem is visible?  When the game contains many scripts.

SOLUTION (trick):
to use:
changeentityproperty(self,"position",parent_x,parent_z,NULL());
changeentityproperty(self,"velocity",parent_xdir/2,parent_zdir/2,NULL());
(the order is important, and remember to set the board entity type to none)

It seems to work well guys ;)
 
Back
Top Bottom