ID:2428793
 
So I'm working on a text based game and I populated a room with mobs but I can't
seem to figure out how to allow the user to interact with them.

In a map based setting I use something like: set in oview()

but it doesn't seem to work without a map, can I check if there are mobs in a room
that a player can see or interact with somehow?

Like if I made a verb:

mob/verb/talk_to_mob()
if mob in oview()
do stuff

This verb would appear in my commands if the mob was in oview of the player.

but in a text/mud environment that verb does not appear.


Depending on how you're handling things, you could simply add/remove the NPCs to your contents variable to allow for the use of their verbs.
That sounds promising is there a guide or reference article I can look at for this?
You can still have a map even if it isn't visible.
Are you using areas? Because mapless BYOND, meant for MUDs and such, used areas for rooms and that ought to, I believe, allow oview() to function.
Mapless BYOND was never really a big thing, even the MUDs used a hidden map after client.show_map was added, and the ones before that just used a 1x1 client.view and lived with the map being visible partially to BYOND clients (but never for Telnet, obviously).

Definitely ideal to use a map, even if the player's can't see it. It makes it easier to design on your part because you get BYOND's map editor, which was actually designed originally for maps like this (the instance editor was originally designed to make rooms easier to create without programming a ton of children for it), and the ability to visually see what you're doing.

I used to have a small demo showing this exact thing off but it vanished over the years, if you still have trouble I can always rebuild the demo and put it up somewhere.