Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ ROM
➜ Running the server
➜ Obj/room program targeting error
Obj/room program targeting error
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Alarien
(3 posts) Bio
|
Date
| Sun 25 Mar 2007 03:29 PM (UTC) |
Message
| 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 | Top |
|
Posted by
| Meerclar
USA (733 posts) Bio
|
Date
| Reply #1 on Sun 25 Mar 2007 04:34 PM (UTC) Amended on Sun 25 Mar 2007 04:38 PM (UTC) by Meerclar
|
Message
| 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. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | Top |
|
Posted by
| Alarien
(3 posts) Bio
|
Date
| Reply #2 on Sun 25 Mar 2007 04:45 PM (UTC) |
Message
| Would that explain why targets of socials are recognized in mprogs but not in oprogs and rprogs? | Top |
|
Posted by
| Meerclar
USA (733 posts) Bio
|
Date
| Reply #3 on Sun 25 Mar 2007 08:20 PM (UTC) |
Message
| 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. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org | Top |
|
Posted by
| Alarien
(3 posts) Bio
|
Date
| Reply #4 on Sun 25 Mar 2007 08:41 PM (UTC) |
Message
| 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. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
20,277 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top