Posts: 337
Threads: 86
Joined: Dec 2011
Reputation:
0
Ok.. I've tried absolutely everything I can think of..
I need to make it so players cannot surf on the objects when editing them (furniture) because otherwise they can fly out of their house and I don't want that.
Does any one have any ideas for me? I've probably tried most of them but it's worth a shot to have a few ideas chucked at me.
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
Easy solution, don't use dynamic objects when doing your edition use a create object then destroy it when your edition is complete and replace with a dynamic object AND/OR create a bounding box around the work area if the player goes outside the box teleport them back inside.
@Kar Doesn't work with playerobjects.
Posts: 2,938
Threads: 162
Joined: May 2010
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
How is the problem going to persist, they may be able to go outside but as soon as they leave that cube area guess what they teleport back in you've basically exhausted all your options now. Your just going to have to bite the bullet and do it.
There is ONE more thing I just thought of actually use OnPlayerUpdate() and keep checking the constraints of the players movement if their position changes X amount +/- in XYZ then cancel the edit. They would then be limited to camera movements only and would only be able to edit an object from the spot the started editing the object from.
@BenzoAMG - Will not work as expected I'm pretty sure the dynamic area WILL not follow the object position until an edition is saved as the editor is local.
Posts: 3,085
Threads: 37
Joined: Nov 2012
Reputation:
0
I already told you a solution for this. When the player begins to edit the object, (AKA before EditObject or EditDynamicObject is used) save the player's position, save the object's position. Create a dynamic area that is accustomed to either the object or playerid (preferably playerid), then attach that to the object itself. When the callback 'OnPlayerEnterDynamicArea' is called (from Incognito's streamer plugin), check if the area is the one attached to the object, then cancel editing (CancelEdit or whatever it is for dynamic objects...), set the player back to their position that was previously saved. Set the object back to the position that it was originally saved in. Fixed.
NOTE: When creating the dynamic area, make sure the radius isn't that large.