Replies: 1 (Who?), Viewed: 659 times.
*shrugs*
staff: moderator
Original Poster
#1 Old 29th Mar 2019 at 3:34 AM
Default Check object accessibility?
Is there a way to check if an object is accessible before the Sim tries to route to it?

For example, I have a BHAV that finds a shower and checks to see if it's in use...
[prim 0x001F] Set to Next (Stack Object ID 0x0000, object of type: GUID 0x2E929489, disabled objects included: False)
[prim 0x0002] Expression (Stack Object's 0x0008 (flags) Flag Set? flag# Literal 0x0006 (in use))

Then I try to push the "Take Shower" interaction onto the Sim, but he can't get to the shower because it is in the women's bathroom.

Is there a way I can exclude inaccessible objects or determine they're unreachable and go back to the Set To Next?

I seem to recall a "Room Accessible?" BHAV that came with AL, but I'd rather not add that requirement if possible.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Advertisement
Lab Assistant
#2 Old 29th Mar 2019 at 10:55 AM
I've been looking round, searching for resources with room, door, accessible.. and then suddenly i remembered that bar a sneaky mod, you can't teleport to some rooms, so there must be a test. Found Interaction - Poof To Here - TEST inside which there's a call to a Lua("IsAccessibleRoom"[...]), OpCode 7E with the details 3001C000F9FF030B00041D0007000000. Is that what you're looking for? Otherwise, it's the false branch of the routing call that should feed back into the test, right?

saint_diana, true Ravenclaw
Back to top