Temporarily removing things from backdrop scope?

I have quite a few objects in the backdrop scope script. Mostly scenery objects such as ceiling, walls, floor, ground, sky etc.
I also have a uniform object there. Long story short, I want to remove that particular uniform object from scope when I'm in a certain room.
Hoooooow do I do that? I've tried everything I can think of and then some. Without making it happen.

I'll try to explain better:

player.parent = ANY room but Room X

Player types look uniform and the description of the uniform object in the backdrop scope scripts is shown.

player.parent = Room X

Player types look uniform and I want the description of the uniform IN THAT ROOM to be shown.
Instead a list appears, asking me which uniform and it bugs me to death.
I have this problem with a couple of objects that's also in the backdrop scope script.

I could really use some help here.
That "wich one-list" is driving me absolutely crazy!


What does your backdrop scope script look like at present?

Is it something like:

list add (items, floor)
list add (items, ceiling)
list add (items, uniform)

?

If so, you could just make it:

list add (items, floor)
list add (items, ceiling)
if (not player.parent = room X) {
  list add (items, uniform)
}

Or even make it so that the object 'uniform' is added to the backdrop scope only if there isn't another object in the room with the alias "uniform":

list add (items, floor)
list add (items, ceiling)
if (ListCount (FilterByAttribute (items, "alias", "uniform")) = 0) {
  list add (items, uniform)
}

Never mind, mrangel beat me to it.


That simple huh?
Does that mean the backdrop scope script works sort of like a turnscript? I had no idea. Either way: thanks a bunch!


The backdrop scope script runs every time the game needs to determine whether an object is in scope. So you can do some pretty advanced things with it.

As of Quest 5.8, you can also give a room or command its own backdrop scope script: a script attribute named changecommandscope. This will be run after the standard backdrop scope, and can add or remove things from the items list in the same way.
This one is slightly more powerful, because it also has access to the variables command (the command element for the command being executed), variable (a string like "object1" so you can put different objects in scope for them), and matched (an objectdictionary containing any parameters that have already matched).


@mra
That sounds terrific! I haven't installed 5.8 yet though. Been working so hard on Act II and I'm afraid it'll break or something if I update the desktop player. The plan was to finish it and install 5.8 when I'll start working on act III.


(I accidentally posted twice, sorry about that)


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums