Draw Distance -
BodyBoardVEVO - 03.02.2014
pawn Code:
building1 = CreateDynamicObject(11340, -2079.95, 159.20, 30.87, 0.00, 0.00, 0.00, 300);
building2 = CreateDynamicObject(10983, -2076.65, 222.85, 31.22, 0.00, 0.00, 0.00, 300);
That happens if i add dreaw distance.
So, i got SetDynamicObjectMaterial here, it doesnt show up from far away, so i want to add that draw distance 300, but than happens that, what is in pic.
Re: Draw Distance -
ikey07 - 03.02.2014
On 0.3x use:
building1 = CreateDynamicObject(11340, -2079.95, 159.20, 30.87, 0.00, 0.00, 0.00);
or with parameters
building1 = CreateDynamicObject(11340, -2079.95, 159.20, 30.87, 0.00, 0.00, 0.00,-1,-1,-1,300.0);
Or on 0.3z
building1 = CreateDynamicObject(11340, -2079.95, 159.20, 30.87, 0.00, 0.00, 0.00,-1,-1,-1,300.0,300.0);
as on 0.3z plugin you can set object stream and object draw distance
Re: Draw Distance -
BodyBoardVEVO - 04.02.2014
Well, it's not helping, tbh.
pawn Code:
building1 = CreateDynamicObject(11340, -2079.95, 159.20, 30.87, 0.00, 0.00, 0.00,-1,-1,-1,300.0);
building2 = CreateDynamicObject(10983, -2076.65, 222.85, 31.22, 0.00, 0.00, 0.00, 300.0);
Re: Draw Distance -
Konstantinos - 04.02.2014
I don't know if the updated version of the plugin for the 0.3z allows us to use draw distance in CreateDynamicObject function but in earlier versions (0.3x and below) it did not.
CreateDynamicObject has a lack of draw distance and the last parameter is stream distance which differs. You can use either CreateDynamicObject + Streamer_SetFloatData to set its draw distance or CreateDynamicObjectEx.
An example for the first one:
pawn Code:
stock CDO(modelid, Float: x, Float: y, Float: z, Float: rx, Float: ry, Float: rz, worldid = -1, interiorid = -1, playerid = -1, Float: streamdistance = 200.0)
{
new objectid = CreateDynamicObject(modelid, x, y, z, rx, ry, rz, worldid, interiorid, playerid, streamdistance);
Streamer_SetFloatData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_DRAW_DISTANCE, 300.0);
return objectid;
}
Re: Draw Distance -
Lordzy - 04.02.2014
Streamer sometimes got issues with the draw distance parameter. After creating an object, you need to set it's data using
Streamer_SetFloatData. Though, I've not experienced invisible texture as the output while drawdistance is set, maybe because I haven't tried setting the object's material on objects with drawdistance.
pawn Code:
Streamer_SetFloatData(STREAMER_TYPE_OBJECT, building1, E_STREAMER_DRAW_DISTANCE, 300.0);
EDIT: Late.
Re: Draw Distance -
Pottus - 04.02.2014
This is a very common problem but at least there is more than one solution. I would prefer to use the function method over CreateDynamicObjectEx() usually because the extended parameters are not required and if I need to change vw, playerid, int the CreateDynamicObject() method is all I would need in almost any case.
Re: Draw Distance -
BodyBoardVEVO - 04.02.2014
Quote:
Originally Posted by [uL]Pottus
This is a very common problem but at least there is more than one solution. I would prefer to use the function method over CreateDynamicObjectEx() usually because the extended parameters are not required and if I need to change vw, playerid, int the CreateDynamicObject() method is all I would need in almost any case.
|
I tried CreateDynamicObjectEx though, not difference.
Re: Draw Distance -
ikey07 - 04.02.2014
Does it work with CreateObject ?
Re: Draw Distance -
Pottus - 04.02.2014
Quote:
Originally Posted by BodyBoardVEVO
I tried CreateDynamicObjectEx though, not difference.
|
Until you try to use player, vw, int with features you don't need.