Author Topic: Having the PC remain seated while in a conversation.  (Read 307 times)

Legacy_grostilzirelman

  • Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
Having the PC remain seated while in a conversation.
« on: November 25, 2011, 11:01:28 pm »


               I've been trying it for a little bit but I can't seem to get it to work, has anyone tried it? Basically I have the player sitting in a chair which starts a conversation. That works fine, but as expected the player then stands up. Tried shutting off the animation thinking that might solve it, no. Tried clearing all actions on the PC, that just makes them stand up @_@

Any ideas? I'd really appreciate it.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Having the PC remain seated while in a conversation.
« Reply #1 on: November 25, 2011, 11:20:25 pm »


                I had this same problem several months ago. Here's the thread.

The trick is to use BeginConversation instead of ActionStartConversation.
Keep in mind that BeginConversation returns an int, so you'll need to capture the int if you wrap BeginConversaton in ActionDoCommand
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Having the PC remain seated while in a conversation.
« Reply #2 on: November 25, 2011, 11:26:50 pm »


               I have not tryed anything, but can see all kinds of problems to overcome.  

The first question how are you atarting the conversation?

ActionStartConversation is garrenteed to stop the PC from sitting.  You have to cancile the action of sitting to have the conversation action fire.  

you could try BeginConversation() and see if it would allow the PC to remain sitting.  

if that fails the only thing I could think of trying would be to statr the conversation, pause it and have the players retake there seats, then resume the conversation.
               
               

               
            

Legacy_grostilzirelman

  • Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
Having the PC remain seated while in a conversation.
« Reply #3 on: November 25, 2011, 11:48:52 pm »


               

void main()

{   

object oSelf = OBJECT_SELF; 
object oPC = GetLastUsedBy();

AssignCommand(oPC, ActionSit(oSelf)); 
DelayCommand(1.5f,ActionStartConversation(oPC, "tmp_introduction"));
}


That's it. Basically they sit, waits a bit for the animation to finish and starts conversation. I guess any 'Action' is gonna stop them from sitting. So ActionStartConversation really isn't a clean option. I'm currently playing with BeginConversation to see what might work.
               
               

               


                     Modifié par grostilzirelman, 25 novembre 2011 - 11:49 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Having the PC remain seated while in a conversation.
« Reply #4 on: November 25, 2011, 11:51:56 pm »


               I think for BeginConversation to work you need to avoid ActionDoCommand or AssignCommand because that will generate an action.

As long as the script is running on the PC it should work. ExecuteScript the PC and put all the commands for the PC in that script including BeginConversation.
               
               

               
            

Legacy_grostilzirelman

  • Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
Having the PC remain seated while in a conversation.
« Reply #5 on: November 26, 2011, 12:01:12 am »


                Got it. Basically this is what I did. First on the chair make it start a conversation upon used. Then in the first line of the conversation I used this.

void main()
{
object oPC           =   GetPCSpeaker();object oChairPC     =   GetObjectByTag("IntroChair");  //being the tag of the chair the pc sits in

    ActionPauseConversation();    AssignCommand(oPC, ActionWait(2.0));    ActionResumeConversation();    AssignCommand(oPC, ActionSit(oChairPC));}


Thanks alot for everyones help, and that other post made all the difference.
               
               

               
            

Legacy_grostilzirelman

  • Newbie
  • *
  • Posts: 42
  • Karma: +0/-0
Having the PC remain seated while in a conversation.
« Reply #6 on: November 26, 2011, 12:01:50 am »


               

grostilzirelman wrote...

 Got it. Basically this is what I did. First on the chair make it start a conversation upon used. Then in the first line of the conversation I used this.


void main()

{
object oPC           =   GetPCSpeaker();
object oChairPC     =   GetObjectByTag("IntroChair");  //being the tag of the chair the pc sits in

ActionPauseConversation();
AssignCommand(oPC, ActionWait(2.0));
ActionResumeConversation();
AssignCommand(oPC, ActionSit(oChairPC));}


Thanks alot for everyones help, and that other post made all the difference.