DarkLink Posted July 2, 2011 Posted July 2, 2011 Okay guys, I went to setElementVisibleTo page and notice that there are some elements that cannot be invisible. because of sync.. But I want to do it client side, in some condition I want the object invisible to that client, and in another condition I want the object visible to client. Is there a possible suggestion? I though that I could do it, using move object. when I dont want client to see, I move object to sky, and when I want it to be seen I move it to the ground. But this is not a good solution for me, becouse the ground is not flat at that point.. Thanks guys in advance. EDIT: Personally I was thinking to myself here .. We can pick objects in the map file to put them on a table and when we dont want to view them we destroy them. When we want to view them we create them, in the same coordernadas they were created. Is it possible? or there are better solution? ty Thank you!
Oz. Posted July 2, 2011 Posted July 2, 2011 Is there a reason why setElementAlpha wouldn't satisfy your requirement?
DarkLink Posted July 2, 2011 Author Posted July 2, 2011 Is there a reason why setElementAlpha wouldn't satisfy your requirement? Thanks for ur answer, and I guess yes, there is a reason, I found this on wiki: This function sets the alpha(transparency) value for the specified element. This can be a player or a vehicle. Its true? or .. changed? ty
Oz. Posted July 2, 2011 Posted July 2, 2011 I think 'element' is an overarching term for a whole bunch of things including objects, not just peds & vehicles. But I could be wrong, scripter I ain't.
Faw[Ful] Posted July 2, 2011 Posted July 2, 2011 Yea objects can be invisible , but not semi-transparent easy way : give an interior to the object in the editor.
DarkLink Posted July 2, 2011 Author Posted July 2, 2011 Yea objects can be invisible , but not semi-transparent easy way : give an interior to the object in the editor. ahhh putting on interior should work !! NICE I will try the setVisibleTo and change interior, talk to u later guys saying if it worked. thanks
JR10 Posted July 2, 2011 Posted July 2, 2011 I think that setElementAlpha is for objects too, since i saw somewhere someone used it.
[DemoN] Posted July 2, 2011 Posted July 2, 2011 I think that setElementAlpha is for objects too, since i saw somewhere someone used it. because you can use setElementAlpha on objects too. I tried it several times and it worked...
karlis Posted July 2, 2011 Posted July 2, 2011 objects can be semi-transparent from 1.1 onwards, you just will need to make pretty easy shader for that.
Faw[Ful] Posted July 2, 2011 Posted July 2, 2011 You think this will work with the alpha texture or opacity on a custom model, to be able work with all the visual possibility on this ? In single player I heard that is due to object parameters 4 and 8 ('Alpha Transparency 1' and 'Alpha Transparency 2' respectively).
karlis Posted July 3, 2011 Posted July 3, 2011 You think this will work with the alpha texture or opacity on a custom model, to be able work with all the visual possibility on this ?In single player I heard that is due to object parameters 4 and 8 ('Alpha Transparency 1' and 'Alpha Transparency 2' respectively). no, just passing another alpha in pixel shader, and enabling alpha blending technique.
DarkLink Posted July 3, 2011 Author Posted July 3, 2011 Guys setElementAlpha worked on my objects, MTA Team should edit wiki Future scripters could have the same doubt as me Here it is : https://wiki.multitheftauto.com/wiki/SetElementAlpha Thanks guys.
Faw[Ful] Posted July 3, 2011 Posted July 3, 2011 You think this will work with the alpha texture or opacity on a custom model, to be able work with all the visual possibility on this ?In single player I heard that is due to object parameters 4 and 8 ('Alpha Transparency 1' and 'Alpha Transparency 2' respectively). no, just passing another alpha in pixel shader, and enabling alpha blending technique. Ok ! Well, I will make test and add my bugs on the mantis. For now (MTA 1.0.5) it work if the alpha is on the current object, current object will be visible behind the alpha of this object.
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