Hickory Posted July 19, 2011 Posted July 19, 2011 I am trying to determine if it is possible to check if a player is entering (ie. about to sit, lie) OR exiting a piece of furniture. I know you can use OnActivate, but that is no good (at least in the ways I have tried), because I need to know (and keep track of) if the player is getting up from, is starting to use or is using the furniture. I want to avoid using OBSE. Each attempt I have made has ended up with the condition firing whether the player sits or gets up. My head hurts. Imaginary scenario:A player sits on a chair, at which point a sound plays.While the player is *still* sitting on the chair a sound plays intermittently at random.When the player gets up off the chair no more sounds, especially at the stage of exiting the chair (this is where I have stumbled using OnActivate). Hope that makes sense.
Grumpf_be Posted July 20, 2011 Posted July 20, 2011 On 7/19/2011 at 8:44 PM, troybayliss said: GetSitting? Combine that with some conditions on your furniture and it should work.Now, if you want to stream music without OBSE you're more or less SOL unless it's a public place...
Hickory Posted July 20, 2011 Author Posted July 20, 2011 Thank you both, I will give GetSitting a try. Update: Thanks guys, GetSitting was just the job. :thumbsup:
Grumpf_be Posted July 20, 2011 Posted July 20, 2011 On 7/20/2011 at 1:09 PM, Hickory said: Thank you both, I will give GetSitting a try. Update: Thanks guys, GetSitting was just the job. :thumbsup: Perfect then. What's your code if we can be curious?
Hickory Posted July 20, 2011 Author Posted July 20, 2011 On 7/20/2011 at 9:08 PM, Grumpf_be said: On 7/20/2011 at 1:09 PM, Hickory said: Thank you both, I will give GetSitting a try. Update: Thanks guys, GetSitting was just the job. :thumbsup: Perfect then. What's your code if we can be curious? In essence: ; Make sure the player is not already sitting, or waiting to get up If ( ( player.GetSitting != 3 ) && ( player.GetSitting != 4 ) ) ; Do some stuff EndIf
Recommended Posts