Jump to content
Sign in to follow this  
UbiquitousUK

Creating "ghost objects"?

Recommended Posts

Is there a way via scripts to achieve any or all of the following things?:

  1. Disable collision for an object so that you can walk through it.
  2. Reduce the saturation of a single object so that it is rendered in grayscale (rest of the world still rendered at full saturation.
  3. Reduce the opacity of an object so that you can partly see through it.

Essentially, this boils down to the question: is it possible to make a unit look like a ghost?

Share this post


Link to post
Share on other sites

1) Yes object enableSimulation true - will freeze anims though.

2 & 3) object setObjectTexture [0,'#(argb,8,8,3)color(0,0,0,0.5)'];

The numbers in the brackets after the word "color" are the ones you want to change.

In format r,g,b,alpha

Share this post


Link to post
Share on other sites

^^, i think i have an idea of what you are trying to do

Disable collision for an object so that you can walk through it.

disableCollisionWith and enableCollisionWith should help you, but it works between two objects only, not for all players, you need to apply it to each player.

Reduce the saturation of a single object so that it is rendered in grayscale (rest of the world still rendered at full saturation.

Like Das Attorney said, but if you are in developper version, prefer setObjectTextureGlobal (thanks Beerkan :P)

Reduce the opacity of an object so that you can partly see through it.

The only way seem to be a mod that include a new object exactly like the one you want but with a custom texture including transparency

Share this post


Link to post
Share on other sites

Thanks both. I can indeed achieve (1) with a combination of disableCollisionWith, disableSimulation, and allowDamage.

It seems like there are problems getting setObjectTexture to put a translucent texture onto a unit. I would be willing to give up on the opacity if I could turn the object in question (a rifleman in this case) into a completely white statue. However, when I do

object setObjectTexture [0,'#(argb,8,8,3)color(1,1,1,1)'];

the uniform turns white, but not the skin, helmet, vest, weapon, goggles, etc. Is there a way to make all of these things white? From what I read, this isn't possible because there is no hiddenselection entry for a rifleman's skin.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×