I'd like to create a selection menu based on variable length data. For example, I have the following objects, which correspond to actions in the game:
define object <action1>
properties <name=say hello; want=talk; fulfill=5>
end define
define object <action2>
properties <name=make smalltalk; want=talk; fulfill=15>
end define
define object <action3>
properties <name=converse; want=talk; fulfill=20>
end define
...etc
You can see that each action has properties associated with it. Now I'd like to build a selection menu that allows the player to choose an action. The menu should have all the actions from these objects, and not "hard-code" them. Something like this:
define selection <want_fullfilment_menu>
info <Choose a type of action>
set numeric <action_num; 1>
repeat while exists <action%action_num%> {
choice <$objectproperty(action%action_num%; name)$> script
set numeric<action_num; %action_num% + 1>
}
end define
I know this isn't legit code (I tried it!), but can you guys think of any way to handle this?
Thanks!