Fist Posted December 10, 2017 Share Posted December 10, 2017 (edited) hello, i have problem with making marker bigger, visually it all works fine. But when player moves screen when it goes out of default marker size it stops rendering marker and disappears until player moves screen back to default size. This is a problem because i need marker really big just for visuals. it's like rendering size just stays the same, but marker's size changes. Edited December 10, 2017 by Fist Link to comment
Fist Posted December 10, 2017 Author Share Posted December 10, 2017 i'm just trying to create pubg zone indicator, if anyone knows a workaround, i would be glad to hear it. Link to comment
Moderators IIYAMA Posted December 10, 2017 Moderators Share Posted December 10, 2017 I am missing some context and code. Link to comment
Fist Posted December 10, 2017 Author Share Posted December 10, 2017 Just now, IIYAMA said: I am missing some context and code. huh? marker creation ( for just testing ) addCommandHandler("marker",function(source) local x,y,z = getElementPosition(source); local wall = createMarker(x,y,z,"cylinder",100,255,255,255,200,root); setMarkerSize(wall,100) -- tried resizing it with this maybe that would've changed render size with markers size together, but nope. setElementDimension(wall,getElementDimension(source)); end) here's shader applying a texture to marker. addEventHandler("onClientResourceStart",resourceRoot,function() local wallshader = dxCreateShader("shader/zone.fx"); local walltexture = dxCreateTexture("images/wall.png"); dxSetShaderValue(wallshader,"MarkerSkin",walltexture); engineApplyShaderToWorldTexture(wallshader,"cj_w_grad"); end); Link to comment
Moderators IIYAMA Posted December 11, 2017 Moderators Share Posted December 11, 2017 Quote disappears until player moves screen back to default size Quote goes out of default marker size Screen size or marker size? If I am understanding it correctly: "The size of the marker will de-increase and disappear when a player resizes their screen (when they are using window mode)?" Or do you mean this: "The size of the marker will de-increase and disappear when a player moves their screen? But it will be back to default when they stop moving it?" Or this: "The large marker will disappear when the player his screen goes inside of the marker?" ( I know this one. It can't be solved because of GTA limitations. You need a dx solution or an object.) And give me some real context, for example a screenshot. Link to comment
Fist Posted December 11, 2017 Author Share Posted December 11, 2017 11 hours ago, IIYAMA said: Screen size or marker size? If I am understanding it correctly: "The size of the marker will de-increase and disappear when a player resizes their screen (when they are using window mode)?" Or do you mean this: "The size of the marker will de-increase and disappear when a player moves their screen? But it will be back to default when they stop moving it?" Or this: "The large marker will disappear when the player his screen goes inside of the marker?" ( I know this one. It can't be solved because of GTA limitations. You need a dx solution or an object.) And give me some real context, for example a screenshot. yep it's more or less last one what you mentioned. I tried with dx but that eats way too much fps, gonna use an object then. 1 Link to comment
Fist Posted December 11, 2017 Author Share Posted December 11, 2017 @IIYAMA so i tried with object, all works fine but when you move far away from object it stops rendering it, is there a way to prevent this? I tried doing setElementStreamable(obj,false) but that doesn't work visually, i guess it just stays there but not visually for client. Tried even placing a huge .col file neither worked. Link to comment
Moderators IIYAMA Posted December 11, 2017 Moderators Share Posted December 11, 2017 (edited) object createObject ( int modelid, float x, float y, float z, [ float rx, float ry, float rz, bool isLowLOD = false ] ) Set to true. Works for me very good, see screenshots: Edited December 11, 2017 by IIYAMA Link to comment
Fist Posted December 11, 2017 Author Share Posted December 11, 2017 2 minutes ago, IIYAMA said: object createObject ( int modelid, float x, float y, float z, [ float rx, float ry, float rz, bool isLowLOD = false ] ) Set to true. Works for me very good, see screenshots: yeah i already have that on too, but gas size starts with really big size, and if someone is on edge that object won't render until he moves closer to center and he won't see gas effect in that place and he won't be able to tell if he's in it or not. Link to comment
Moderators IIYAMA Posted December 11, 2017 Moderators Share Posted December 11, 2017 Use an object like a sea floor as basis element. Link to comment
Fist Posted December 11, 2017 Author Share Posted December 11, 2017 25 minutes ago, IIYAMA said: Use an object like a sea floor as basis element. http://prntscr.com/hm4dji still render size is same for it Link to comment
Moderators IIYAMA Posted December 11, 2017 Moderators Share Posted December 11, 2017 lol my lowLOD objects are doing a better job. I assigned them to an object, maybe that matters. Also are you mta settings max out? Link to comment
Fist Posted December 11, 2017 Author Share Posted December 11, 2017 (edited) 1 hour ago, IIYAMA said: lol my lowLOD objects are doing a better job. I assigned them to an object, maybe that matters. Also are you mta settings max out? actually, i dropped it off making it with object. I did it with dx, works perfectly, previously it lagged because i was drawing way to many of them, now i optimized it and works so well. Only thing what i don't know, is how i can make dxCreateTexture animated? Like wall is sparking like in default pubg zone wall, like in this image. http://prntscr.com/hm6o2w also when i change width of dxDrawMaterialLine3D then texture stretches too, is there a way to make it just like 50x50 just which repeats by itself, so size stays untouch and it fills whole thing of dxDrawMaterialLine3D Edited December 11, 2017 by Fist Link to comment
Moderators IIYAMA Posted December 11, 2017 Moderators Share Posted December 11, 2017 You can't animate a texture. But you can render different textures as frames for an animation. For repeating use: https://wiki.multitheftauto.com/wiki/DxDrawMaterialSectionLine3D 1 Link to comment
Fist Posted December 11, 2017 Author Share Posted December 11, 2017 18 minutes ago, IIYAMA said: You can't animate a texture. But you can render different textures as frames for an animation. For repeating use: https://wiki.multitheftauto.com/wiki/DxDrawMaterialSectionLine3D ok thank you for your help. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now