Author Topic: make a placeable invisible?  (Read 640 times)

Legacy_xorbaxian

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
make a placeable invisible?
« on: August 03, 2012, 07:03:02 pm »


               greetings,

i have an area where i'd like various placeables to be invisible. [this is not the 'invisible object' placeable, but rather normal placeables which are invisible.] after reading this thread, i thought i'd found the solution in cutscene invisibility, and doing this does make the object invisible, but unfortunately it's not subject to 'see invisibility' and 'true seeing' spells, and i want these placeables to react normally, as anything else invisible would. applying the standard invis effects doesn't work either ; the objects just remain visible. other possible 'solutions' i've come up with are-

- hook the spells and/or enter scripts so they'll strip cutscene invis from tagged objects, but this is suboptimal not only because it's kludgey but also because it would render the objects visible to all characters, not just the character w/true sight.

- not have a placeable there at all, but spawn it in if a character w/true sight triggers something. also suboptimal, for the same reasons.

any suggestions?

thanks
-x
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
make a placeable invisible?
« Reply #1 on: August 03, 2012, 07:33:03 pm »


               Another option is to create an immobile creature with the appearance of the placeable. (this would require an additional row in appearance.2da and to put this 2da in the top hak for your module).

Invisibility as far as I know is only applicable to creature objects.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
make a placeable invisible?
« Reply #2 on: August 03, 2012, 11:16:38 pm »


               Just make the Blind deff and dumb creature and Change his appearance in his OnSpawn Script. No 2da edit needed.
               
               

               


                     Modifié par Lightfoot8, 03 août 2012 - 11:33 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
make a placeable invisible?
« Reply #3 on: August 04, 2012, 12:10:04 am »


               Lightfoot8, the placeable that the OP desires to make invisible may not have a corresponding creature appearance.

Is there a way to do this other than by adding a new row to appearance.2da with the same model as the placeable they are representing?
               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
make a placeable invisible?
« Reply #4 on: August 04, 2012, 12:24:35 am »


               Why not just use the invisible placeable as the default then spawn in the visible one when needed? It would be easy enough to set it to the same position.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
make a placeable invisible?
« Reply #5 on: August 04, 2012, 12:34:31 am »


               Pstemarie, that works in single player, but when you have multiple players how do you make the spawned in placeable only visible for the player(s) that can see it?
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
make a placeable invisible?
« Reply #6 on: August 04, 2012, 12:35:54 am »


               @ henesua :   Sorry excues my bad memory.
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
make a placeable invisible?
« Reply #7 on: August 04, 2012, 12:51:41 am »


               I'm not certain visibility lists are maintained for placeables.  Assuming that they are, nwnx (for both windows and linux) does support the changing of visibility status for a single creature towards an object, but I've never tried it with a placeable.

It's in nwnx_funcs on the windows end of it.

//**** Original work by virusman ****

const int VISIBILITY_TYPE_DEFAULT = 0;
const int VISIBILITY_TYPE_VISIBLE = 1;
const int VISIBILITY_TYPE_INVISIBLE = 2;

// Sets the visibility of oObject for everybody
void NWNXFuncs_SetVisibilityOverride(object oObject, int nVisibilityType);

// Sets whether oObject2 can see oObject1
void NWNXFuncs_SetVisibility(object oObject1, object oObject2, int nVisibility);

// Gets the visibility of oObject
int NWNXFuncs_GetVisibilityOverride(object oObject);

// Gets whether oObject2 can see oObject1
int NWNXFuncs_GetVisibility(object oObject1, object oObject2);

//**************************************
               
               

               
            

Legacy_xorbaxian

  • Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
make a placeable invisible?
« Reply #8 on: August 04, 2012, 08:26:46 am »


               w00T! thanks for the great ideas!
yes, i could make it a creature, that would work. the nwnx solution offers a little more flexibility, if a little more complex, but definitely the way to go if i need to use the placeable's inventory. time to upgrade my nwnx, and gods be praised for virusman.

thanks for the ideas. '<img'>
               
               

               


                     Modifié par xorbaxian, 04 août 2012 - 07:28 .
                     
                  


            

Legacy_virusman

  • Sr. Member
  • ****
  • Posts: 448
  • Karma: +0/-0
make a placeable invisible?
« Reply #9 on: August 05, 2012, 09:47:59 pm »


               Yes, NWNX Visibility (on Linux; or part of NWNX Funcs on Windows) works with placeables. Just make sure they're not static.
               
               

               


                     Modifié par virusman, 05 août 2012 - 08:56 .
                     
                  


            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
make a placeable invisible?
« Reply #10 on: August 17, 2012, 01:41:45 pm »


               hey virusman -
I tried doing this last night with a placeable.

plot, non-static, and usable

But couldnt get it to be invisible.
Could you have a quick look?
http://nwnx.org/phpB...opic.php?t=2004
This is for the win32 funcs -  I know maxrock converted it over, I was just wondering if you might see what is either wrong with the code, or whether I am invoking it incorrectly?

The Set visibility override works - so I can make a placeable invisible to all, or visible to all.
But when setting visibility for single players vs a placeable, it doesnt want to work.