Is there a way to print a list of objects in room, but only if they have a certain flag or so?

Hi guys,
just another question. I hope there's a way.

My goal is to give in object a 'throw' or verb which will print a list of objects that can get targeted.


>Throw marple

Throw at which target?

  1. Cornelius
  2. Laughing Goblin
  3. Window

You throw the marple at Cornelius. The goblin laughs louder.

I hope it's possible to make it look like this. I thought about using the flag "throw_target" and if I throw a object a list of all objects in the room with the "throw_target" flag appears. This would become very handy for many future usages in my imagination. Any solutions?

Thx, Curt

Yes, you can do exactly that. You can then get your list of targets like this:

targets = FilterByAttribute(ScopeVisibleNotHeld, "throw_target", true)
ShowMenu("Throw at which target?", targets, true) {

Okay, this is nice and those Scope seems very useful, but I don't get it working.

Error running script: Error compiling expression 'ScopeVisibleNotHeld': Unknown object or variable 'ScopeVisibleNotHeld'

I tried to use it on easier scripts, but can't figure out how this ScopeVisibleNotHeld should work as quest seems not recognizing it.

Sorry, my bad; I forgot the brackets after the scope. Should be:

targets = FilterByAttribute(ScopeVisibleNotHeld(), "throw_target", true)
ShowMenu("Throw at which target?", targets, true) {

Oh, thanks you. This will help me so much... I already read about the other scopes now. Got excited...a bit...
Thx, Curt

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