Draw Distance
#1

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.
Reply
#2

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
Reply
#3

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);
Reply
#4

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;
}
Reply
#5

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.
Reply
#6

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.
Reply
#7

Quote:
Originally Posted by [uL]Pottus
View Post
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.
Reply
#8

Does it work with CreateObject ?
Reply
#9

Quote:
Originally Posted by BodyBoardVEVO
View Post
I tried CreateDynamicObjectEx though, not difference.
Until you try to use player, vw, int with features you don't need.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)