[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  ROM
. -> [Folder]  Running the server
. . -> [Subject]  Obj/room program targeting error
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Obj/room program targeting error

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Alarien   (3 posts)  [Biography] bio
Date Sun 25 Mar 2007 03:29 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Meerclar   USA  (600 posts)  [Biography] bio
Date Reply #1 on Sun 25 Mar 2007 04:34 PM (UTC)  quote  ]

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
[Go to top] top

Posted by Alarien   (3 posts)  [Biography] bio
Date Reply #2 on Sun 25 Mar 2007 04:45 PM (UTC)  quote  ]
Message
Would that explain why targets of socials are recognized in mprogs but not in oprogs and rprogs?
[Go to top] top

Posted by Meerclar   USA  (600 posts)  [Biography] bio
Date Reply #3 on Sun 25 Mar 2007 08:20 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Alarien   (3 posts)  [Biography] bio
Date Reply #4 on Sun 25 Mar 2007 08:41 PM (UTC)  quote  ]
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.
[Go to top] 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.


4,287 views.

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]