View Full Version : Two Clickable Areas on Object
Hunter240x
23rd Mar 2008, 11:58 PM
I orginally had two questions but found the answer to one. But with this question I didn't know what exactly to type in the search box. I'm looking for a little shove in the right direction.
I cloned a double bed and my object currently has two clickable areas. When I click on one side of the object to have Sim A go to the routing slot it brings up a "join" option for Sim B. When I click on the same side of the object it will bring up the "join" option but when I click on the other side of the object the orginal menu appears.
I had this problem once before and Numenor had helped me out with it but that was over a year ago and I can't remember what he said the problem was. I know it was something rather simple to fix. My idea is that it would probably lie somewhere in either the Object Data or Object Function files. But what should I be looking for?
Thanks for the help.
Echo
24th Mar 2008, 02:40 AM
Hunter! Haven't seen you in forever!
I'd check that the Interaction ID in the objd is the same for all the objds, since that's the normal reason for different interaction sets. Failing that, it could be an issue with the way you're setting or reading attributes - if you want to track values across multiple tiles in a single object, make sure you're setting them on the lead tile, not the clicked-on tile. (That is, put in a "Stack Object ID := Stack Object's Lead Tile ID" in before you do anything else).
Hunter240x
24th Mar 2008, 04:07 AM
Hey Echo. Yeah, I've been away from modding for just over a year now. It's amazing how much you can forget in that amount of time. I'm trying to get back in the swing of things. Slowly I'm starting to remember stuff.
I followed your suggestions but unfortuantly neither worked.
I first changed the number in the Interaction Table ID in the objds to match the master tile. That didn't have an effect. I then changed the number to match what the other objds had listed (-1). That made the object non-clickable (but I'm guessing you knew that is what would happen.)
I then added in "Stack Object ID := Stack Object's Lead Tile ID" to my interaction bhav. That just made the two "sides" switch possition.
I then figured maybe you ment "Stack Object's Object ID := Stack Object's Lead Tile ID". That didn't have an effect.
I then tried (out of courisity) "Stack Object's Lead Tile ID := Stack Object ID" and that didn't have an effect.
So I went back to the previous object that I had this problem with and looked through the bhavs. It does contain "Stack Object ID := Stack Object's Lead Tile ID" So I'm assuming that's what Numenor suggested back then also. So I'm at a loss.
And on top of it, this problem has seemed to point me out two other problems that I'm going to have to solve. Well, one's more like an annoyance. Well, I have to get to bed so not much I can do on it tonight. I'll have to try to figure it out tomorrow.
Echo
24th Mar 2008, 04:12 AM
I first changed the number in the Interaction Table ID in the objds to match the master tile. It should be the instance number of the TTAB you're linking it to. :)
I then added in "Stack Object ID := Stack Object's Lead Tile ID" to my interaction bhav. That just made the two "sides" switch possition. Then this is almost certainly your problem. Put that line in at the start of every interaction and guard function. Should solve your problem. :)
I then figured maybe you ment "Stack Object's Object ID := Stack Object's Lead Tile ID". That didn't have an effect. I then tried (out of courisity) "Stack Object's Lead Tile ID := Stack Object ID" and that didn't have an effect. Stack Object's Object ID is a read only field, as is Stack Object's Lead Tile ID. Neither change will do anything. :)
Hunter240x
25th Mar 2008, 01:03 AM
It should be the instance number of the TTAB you're linking it to. :)
Okay, so you're saying the number listed in the Interaction Table ID should be the instance number of the TTAB? I looked back at previous objects and that's never the case. It seems like the Interaction Table ID is always 128 and the instance number of the TTAB is 80. I just want to make sure I understood you correctly.
As for the "Stack Object" command, I did include that in both the guardians and the main interaction bhavs and it did now fix my problem. Likewise, that also appears to have fixed one of the other problems I noticed last night :) I'll have to do a few more tests to make sure. So now I can continue to happily program away for the rest of the night. Thanks Echo.
Echo
25th Mar 2008, 03:35 AM
It seems like the Interaction Table ID is always 128 and the instance number of the TTAB is 80. Heh heh... You are out of practice! ;) Decimal 128 == Hexadecimal 80. Switch your OBJd back into hex mode. :P
Hunter240x
25th Mar 2008, 04:46 AM
:) naw, that doesn't mean I'm out of practice. I never use the Hex mode. I always switch it so I have numbers I can understand :P
vBulletin v3.0.14, Copyright ©2000-2013, Jelsoft Enterprises Ltd.