Best way to set up a Security Camera
Talon
07 Jul 2017, 23:33I'd like to set up a room in my game where the player can use the security cameras to check on the various rooms in the game, seeing which people are at the various camera locations(in an attempt to evade them) My initial ideas of printing out the descriptions of the room (say camera.parent.description) but that wouldn't show the items in the room right? , would it be simplest to use FormatObjectList("through the camera you see ", camera.parent, "and", " “)?
It seems rather clumsy to handle it this way.
Thank you for your time
hegemonkhan
08 Jul 2017, 01:27you use an Objectlist (having its items as the Objects within a Room Object), and then iterate (foreach) through them, doing whatever actions you want, or you can just display the items too (via 'DisplayList' Function):
gets/creates Objectlists:
http://docs.textadventures.co.uk/quest/scopes.html (these can also be found within here, alphabetical order: http://docs.textadventures.co.uk/quest/functions/index_allfunctions.html , but it's nice having the Scopes separated out)
http://docs.textadventures.co.uk/quest/functions/getdirectchildren.html
http://docs.textadventures.co.uk/quest/functions/getallchildobjects.html
http://docs.textadventures.co.uk/quest/functions/allobjects.html
iteration:
http://docs.textadventures.co.uk/quest/scripts/foreach.html
http://docs.textadventures.co.uk/quest/scripts/for.html
Lists:
http://docs.textadventures.co.uk/quest/guides/using_lists.html
http://docs.textadventures.co.uk/quest/functions/corelibrary/displaylist.html
http://docs.textadventures.co.uk/quest/functions/listcount.html
http://docs.textadventures.co.uk/quest/functions/listcontains.html
dictionaries:
http://docs.textadventures.co.uk/quest/using_dictionaries.html
etc etc etc individual links for all of the dictionary functions (lazy, they're same/smiliar as the Lists' Functions)
other stuff:
http://docs.textadventures.co.uk/quest/functions/contains.html (Objects within Objects)
http://docs.textadventures.co.uk/quest/functions/corelibrary/got.html

DarkLizerd
08 Jul 2017, 04:47All that or...
"You are in the control room sitting in front of 4 cameras."
() Look at camera 1
"You see the master bedroom. It is currently empty. There is something you cannot make out on the bed."
() Look at camera 2
"You see the kitchen, there are 2 men, most likely the guards, eating lunch."
You set up what the cameras see. With some object trackers for what is in each room.
The Pixie
08 Jul 2017, 07:45It seems rather clumsy to handle it this way.
Looks pretty slick to me. It depends on whether you want the same descriptions whether you are there or just looking on the camera (in which case your way is great) or a different description, as DarkLizerd suggests. The latter would give a better player experience, but will be harder to do.