SA-MP Forums Archive
Effect with AttachObject - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: General (https://sampforum.blast.hk/forumdisplay.php?fid=13)
+--- Thread: Effect with AttachObject (/showthread.php?tid=661770)



Effect with AttachObject - m1n1vv - 14.12.2018

Kalcor, why AttachObjectToObject makes this effect?
Before/after:

PHP Code:
static obj[2];
obj[0] = CreateObject(194810.00.030.00.00.0180.0);
obj[1] = CreateObject(194810.00.00.00.00.00.0);
SetObjectMaterialText(obj[1], "Text"0130"Arial"600, -1, -167772161);
AttachObjectToObject(obj[1], obj[0], 0.00.00.00.00.00.0); 



Re: Effect with AttachObject - Kalcor - 15.12.2018

Most of the problems you'll have with SetObjectMaterialText revolve around alpha blending. The fontcolor and backcolor parameters take ARGB values. The material will use different alpha blending modes depend on whether the alpha value is set to 0xFF (no transparency) or lower. If you use fontcolor 0xFFFFFFFF (white) and backcolor 0xFF000000 (black), I don't think you'll see any difference.

If you're going to attach text to another object, you need to attach it slightly forward, otherwise you'll come across something called Z-fighting (depth-fighting), which is where the 3D renderer can't tell which object is in front and which is behind.


Re: Effect with AttachObject - m1n1vv - 15.12.2018

Kalcor, thank you. But on the contrary I like this effect. I use an object without a background. With the weather ID 7 text bad seen. Without AttachObject can do this effect? 19475-19483 objects are not enough lighting.



With AttachObject on hosting will not work. I use streamer. Streamer requires the function AttachPlayerObjectToObject. This function in the plugin YSF. YSF kills my server.

Sorry for my bad English.


Re: Effect with AttachObject - m1n1vv - 23.12.2018

And why this effect when attaching an object to the player?