I'm having a problem with obj and room programs in a ROM mud where they don't target the second character in an action correctly. Let's say I have an object program that triggers when someone smiles at someone else (beams a smile at). The two characters involved are $n (the character doing the social) and $t (the target of the social). The program does not recognize $t unless it's a mob program, so I can't have objects that target the target of an action.
I don't know which portion of the code is relevant to this, so here's the link to download it:
http://www.mediafire.com/?9udnytmxttq
Problem here is something you've actually already noticed:
the only target ($t) progs are coded to recognize is the actors current target. Changing this is, unfortunately, not a trivial matter and requires quite a lot of coding and testing.
That said, it *might* be possible to set the actors target to the victim of the social that started the whole mess as a workaround.
I'd honestly be surprised if mprogs are recognizing the targets of the socials rather than the person actually doing the social. Having looked at the code since I first posted, there really isn't a quick/easy workaround for what you want and even my original idea isn't available without some considerable codework. As far as I can find, the only non-random targets recognized by the mprog code are those actually triggering the program, in this case it would be the character doing the socials to trigger the (presumably) act_prog on any mobs in the room.
Mprogs are recognizing the person doing the social ($n) and the person who is the target of the social ($t).
Rprogs and oprogs are only recognizing the person doing the social ($n), but the target just comes up as "someone."
I can't code, myself, but if you could offer any tips on where to get started with coding it so rprogs/oprogs recognize both the initiator and the target, I could pass it on to someone who can.