obj/Button
Click()
var/obj/card/O.Click()
But that doesn't seem to like me very much.
ID:156708
Aug 11 2010, 3:09 pm
|
|
Is it possible to make Click() click something other than the src? If so, can somebody tell me how? I was thinking along the lines of:
obj/Button But that doesn't seem to like me very much. |
Aug 11 2010, 3:34 pm
|
|
What are you trying to do? It sounds like you should just make a procedure on that object and call it manually, instead of hijacking a built-in procedure
|
The click proc for an atom is much different from the click proc for a client. When you alter the default behavior of the atom's click proc you are basically telling that atom what you want it to do when it is clicked. You won't receive info on the thing that clicks it.
obj/Button However, the arguments for a client's click proc allow you to tell which object the client is clicking as well as information about that object. client I'm not really sure what you were trying to do there, but it looks like you were trying to get an object to click something else... EDIT: Also might be worth noting that when you override the default action of client/Click() if you do not remember to call the default action it will not process object.Click(). |
if you want the button to call Click() on another object you would need to fist predetermined which object that is, then call the click for that object.
obj With this. you're looking for a variable of the clicked button and then calling the click for that variable. In this case the button has a variable called "card" which will be the obj/card that you want to be clicked as a result. you can then change which obj/card is the variable for the button, and upon clicking the button it will call the click proc for the card. |
In response to Bravo1
|
|
Thank-you guys. I guess I should have explained in more detail, but Bravo1 showed me what I was looking for. I have read the references for the Click() procedure. I'll be back if I have any more issues, what I basically am trying to do is have a macro system based off of clicking one main object by calling:
.click macro_one On repeat for key 1. Then I could have that click procedure call the click procedure of another object, so that I can set up macros at runtime. |
In response to Darkjohn66
|
|
Or you could just... set up macros at runtime? Using winset()?
|