ID:273481
Jun 8 2010, 5:59 am
|
|
I wanted to call mob.Topic() manually rather than clicking a link. Is is possible? How do I pass out the arguments?
|
In which method do you want to call it? Through a verb/proc? Than link() should do it.
Flash to DM? It's a bit more complicated but quite possible (I have the method but no point of posting it if you do not need it, trying to make a demo for it anyways). If you use link(), pass out the argument such as you would do if someone needed to click a link:
X << link("byond://?command=hi;msg=no")
|
In response to Maximus_Alex2003
|
|
Should be noted that mob.Topic() will work just fine. atom.Topic() is called by passing a src parameter through the link/call.
src << "<a href=?src=\ref[src]&blah>Blah</a>" |
Soul Sign wrote:
I wanted to call mob.Topic() manually rather than clicking a link. Is is possible? How do I pass out the arguments? This makes as much sense as "I want to call Click() without clicking" or "I want to call Move() without moving". If something should happen as a result of EITHER clicking a link OR some other action, then it should be present in a THIRD procedure which is then CALLED by Topic() and then that other action. For example: mob/proc/whatever() |
In response to Garthor
|
|
my main aim was to study the href to be exact.
href=?src=\ref[src];ABC=abc. What does that link command do step by step? My Hypothesis: checks if src true, if true then call src.Topic with the argument ABC[abc]. |
In response to Soul Sign
|
|
It calls client/Topic() for the client who clicked on the link. The href parameter will be "src=[0x3000000];ABC=abc" (the address may be different, it's whatever src was). The href_list[] parameter will be list you get when you run params2list() on that. The hsrc paramter will be the same as the src parameter was.
client/Topic() will then call the Topic() proc for whatever src was, which will have the same paramters except for not having an hsrc parameter. |
In response to Garthor
|
|
thnx Garthor & everyone else,
|
I'm pretty sure mob's cannot call Topic().
Datums, World and Clients can however.
Also, I'm also pretty sure you just use Topic() as if it were just like another built in proc since well, it is.
EDIT:
Just verifying this. It does indeed work, but anything you can do this way, you can just make your own procedure, thus not really needing Topic().