PDA

View Full Version : Making an object with a "Join" and "Ask to join" interaction


Frenchie
5th Feb 2012, 1:56 PM
Hi there modders!

I'm making an object that allows a Sim to protest a variety of things, waving a placard and looking rather annoyed. So far it works as long as the Sim is protesting alone. But there's a bit of a problem, I don't know how to make it so that:
- with the selected sim, while they's protesting, you can click on another sim and choose "ask to join protest" so that they walk next to you and wave the same placard
- with a sim that's not protesting, you can click on a sim that's protesting and choose "join protest". Your sim will walk to the protester and wave the same placard.

I've checked out TV Semiglobals but most of the code is incomprehensible to me, and I'd love it if someone explained how to make a "join" and "ask to join" interaction a little more clearly than that. I'm still not very good at BHAVs...

ATTACHED: The custom animation, the custom placards and the custom protest-inducing object (still requiring social BHAVs) in case you want to have a look.

http://www.modyourpanties.com/hosting/34242_120205073816snapshot_78758ce4_fc3aac78.jpg

Frenchie
2nd Jul 2012, 9:25 AM
Resurrecting this thread because I still don't have the faintest idea how to do this! :(

Echo
2nd Jul 2012, 12:38 PM
Hey Frenchie!

I've not done this myself, so I'm not sure how helpful I can be... But here's what I *do* know, in the hopes that it might give you a faint idea of where to look?

For *true* joinables:
- Joinable interactions need to be flagged as such in the TTAB ("joinable")
- The interactions with this flag tend to be the initiating actions. So, if a single sim can choose to "protest", then the "protest" action would be the one which was joinable. (That is, you don't create a separate menu item for "join in protesting")
- In the guard BHAV for the interaction, you normally call "[global 0x019A] Join - Can Join? (no args)", with the true target pointing to an "Add/Change the Action String" (which then sets the menu item dynamically to "Join".)
- There's some nice sample code in the hot-tub, although I think that's only from the "please join me" side, rather than the "may I join you" side. I suspect, but have never tested, that the code could probably be applied to a social plugin interaction with a bit of tweaking, but it's probably not a one-to-one copy.


For *fake* joinables (with which I have slightly more experience!)
- Just add a couple of social plugins - "Ask to join Protest" and "Join Protest". Have both of them defer their actual interaction to your original interaction. It's a bit hacky, but it's also much better documented. The downside of this is that they won't engage in the multi-person group social behaviour that things like the TV and the dining table have, where everyone gives everyone else social and mood boosts (unless you code it yourself, of course!)

Frenchie
4th Jul 2012, 3:45 PM
I've not done this myself, so I'm not sure how helpful I can be... But here's what I *do* know, in the hopes that it might give you a faint idea of where to look?Thank you, now that I have an outline of what I could possibly do, I'll attempt it :)

I'll post updates on this, should it work. Otherwise, I'll still post actually, except, to ask for more help!

Thank you again for your time :)