Script to show/hide objects?
Right; at the end of 'Birth, and Virgins' there's a wedding reception. I don't want the items for the wedding reception to be hanging around all through the plot, I want them to appear when it's time for the reception, and I want them to get tidied up afterwards.The script I'm trying to write goes something like this:
The problem is that there's no [tt]SetPosition( object, vector)[/tt] function, and the vector you get back from [tt]GetPosition( object)[/tt] is clearly a copy of the position co-ordinates of the object - you can't change the position just by changing the values.Obviously my first thought was to bury my 'reception' scenery underground when I wasn't using it by toggling the sign of it's Z position. But I don't need that to be the solution - if there was a way to hide the objects when I'm not using them, and make them visible again when I want them, that would do equally well.Any suggestions?
Right; at the end of 'Birth, and Virgins' there's a wedding reception. I don't want the items for the wedding reception to be hanging around all through the plot, I want them to appear when it's time for the reception, and I want them to get tidied up afterwards.The script I'm trying to write goes something like this:
Code:
void main(){ PrintString( "Setting/unsetting reception scenery"); int done = FALSE; for (int i = 0; !done; i++) { object ob = GetObjectByTag( "bv_ob_reception", i); if ( ob != OBJECT_INVALID) { vector pos = GetPosition( ob); pos[2] = 0 - pos[ 2]; } else { done = TRUE; } }}