Home   Help Search Login Register  

Author Topic: Quit a PlayMove  (Read 1898 times)

0 Members and 1 Guest are viewing this topic.

Offline Captain Crunch

  • Members
  • *
Quit a PlayMove
« on: 06 Apr 2007, 17:18:05 »


I have these two guys having a conversation using:

Code: [Select]
Mayor PlayMove "AmovPercMstpSnonWnonDnon_talking";
Their conversation seems to be of highest importance because they just won't stop, even if I shoot them dead, they remain talking. What kind of business is this?
I tried using:

Code: [Select]
Mayor PlayMove "";
or even:

Code: [Select]
Mayor SwitchMove "";
But the guys won't lsten. Can anyone help me out of this? Thank You in advance.
Back to the forest!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Quit a PlayMove
« Reply #1 on: 06 Apr 2007, 19:01:56 »
Weird one, looks like this is some sort of bug..

It seems that you have to use switchMove instead of playMove on the talk anim, although even then the unit won't stop even if you shoot him,but then you can use for example switchMove "AmovPercMstpSrasWpstDnon_AmovPercMstpSnonWnonDnon_end" to end the talk anim..
This however does not play that latter anim as a whole but exits the talk anim so that the unit again reacts to the environment (at least he can be killed), but doesn't seem to be completely 'awaken' yet..

 :dunno:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Cold

  • Members
  • *
  • Mission Maker
Re: Quit a PlayMove
« Reply #2 on: 14 May 2007, 17:28:20 »
You might try

mayor switchmove "null";

I've used this (without the mayor name of course) in OFP numerous times in conversation scripts and it's worked perfectly... what you'll want to do is have the script loop, and at the beginning and end of the loop (basically before it runs another animation) you'll want it to check if the mayor is dead. I believe this is "not alive mayor goto "#end".

So at the end of your script at the marked position of "#end" you'll have:
#end
mayor switchmove "null";
exit


I hope this helped more than it hurt since I don't have access to my previous scripts right now (work lol). Keep at it, play with that script line and it'll work!
A leader is best when people barely know he exists, when his work is done, his aim fulfilled, they will say: we did it ourselves. <br />Lao Tzu

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Quit a PlayMove
« Reply #3 on: 16 May 2007, 01:27:35 »
Its true that a UNIT SWITCHMOVE ""; or UNIT SWITCHMOVE "null"; will not end a talking animation that was executed via PLAYMOVE.  The dumb loon will talk forever and cannot be killed. 

However, if the talk animation is executed via SWITCHMOVE, then UNIT SWITCHMOVE ""; will end the animation, and return the unit to its normal state.

The attached sample mission shows two soldiers side by side doing the talk animation:  One started with switchmove, and one started with playmove.  It proves the point.
« Last Edit: 16 May 2007, 03:56:32 by johnnyboy »
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline D_P_

  • Members
  • *
  • YAY! I'm a lama again! ...oh wait.
    • ArmaAddons
Re: Quit a PlayMove
« Reply #4 on: 16 May 2007, 03:35:51 »
is there a lip-sync program to go with these conversations so I don't have to code it by hand?
just setpos & forgetpos!

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Quit a PlayMove
« Reply #5 on: 16 May 2007, 04:00:41 »
I modified the attached sample mission two posts above to include the lip file.  The example now has both units doing this say command so their lips move for a few minutes:

Code: [Select]
this say "NoSoundLongLip";
For this to work, you will need the .ogg and .lip files in the Sound directory, and this entry in your description file:

Code: [Select]
class CfgSounds
{
sounds[] = {NoSoundLongLip};
class NoSoundLongLip
{
name = "NoSoundLongLip";
sound[] = {"NoSoundLongLip.ogg", db-20, 1.0};
titles[] = {0,""};
};
};

Note that in this case the .ogg file is a short file with no sound in it.  Just a placeholder so the say command will work.  The lip file was taken from a lip file of a guy singing a two minute (or so) song, so the lips move a long time.  Not sure exactly how long though. 
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...