invisible objects
#1

ok, im not good at scripting, but i know the basics. Im actually so tired of trying to do it by myself so i need you help so much.

Ok so I try to do invisible objects. Of course it's impossible because if i do it like
Код:
CreateObject(17699, 810, -2535.1000976563, 83.300003051758, 0, 0, 0, 0);
it looks like



so i try with setobjectmaterial, but i don't know how to. So is that possible to replace the texture of the object with "nothing" to make object totally transparent? If so, please give me an example.

Btw. my point is to create invisible fence, with possibility to shoot thorugh it. So, any ideas?

thank you
Reply
#2

Hi.

Although I am unable to recommend how to make an object invisable using the material function, an alternative solution would be to use SetPlayerWorldBounds.

This will basically prevent the player from running outside of a rectangular/square area.
It will also allow players to shoot outside the area, while objects may not provide this.


You could also make your own version of the function by checking the player's coordinates against the coordinates of a square/rectangular area, by using a timer.
Reply
#3

Set the material to 18646, "matcolours", "black", 0x00FFFFFF
Reply
#4

Код:
new xxx;
xxx = CreateObject(17699, 807.79998779297, -2535.1000976563, 83.300003051758, 0, 0, 0);
SetObjectMaterial(xxx, 18646, 0, "matcolours", "black", 0x00FFFFFF);
is that correct?
Reply
#5

Quote:
Originally Posted by EvenemE
Посмотреть сообщение
Код:
new xxx;
xxx = CreateObject(17699, 807.79998779297, -2535.1000976563, 83.300003051758, 0, 0, 0);
SetObjectMaterial(xxx, 18646, 0, "matcolours", "black", 0x00FFFFFF);
is that correct?
Should work, but I think you won't be able to shoot through it. Not possible. =/
Reply
#6

The collision stays.
Reply
#7

Quote:
Originally Posted by irinel1996
Посмотреть сообщение
Should work, but I think you won't be able to shoot through it. Not possible. =/
doesnt work, object is created but there is no effect on it
Reply
#8

What object are you using? You may have the wrong material index.
Reply
#9

Quote:
Originally Posted by EvenemE
Посмотреть сообщение
Код:
new xxx;
xxx = CreateObject(17699, 807.79998779297, -2535.1000976563, 83.300003051758, 0, 0, 0);
SetObjectMaterial(xxx, 18646, 0, "matcolours", "black", 0x00FFFFFF);
is that correct?
SetObjectMaterial(CreateObject(17699,bla),0,"none" ,"none",0x00000000};
Reply
#10

Quote:
Originally Posted by Grand_Micha
Посмотреть сообщение
SetObjectMaterial(CreateObject(17699,bla),0,"none" ,"none",0x00000000};
you are ok?
https://sampwiki.blast.hk/wiki/SetObjectMaterial
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)