Home   Help Search Login Register  

Author Topic: Using PlayMove ""  (Read 1577 times)

0 Members and 1 Guest are viewing this topic.

Offline Evan Scown

  • Members
  • *
Using PlayMove ""
« on: 28 May 2006, 21:39:36 »
Hello,

I found thanks to a rather large manual that there is a command known as PlayMove, and what I want is using the PlayMove "EffectStandPlay" 2 civilians to look like they're talking or having a converstation. How do I do this?

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re: Using PlayMove ""
« Reply #1 on: 28 May 2006, 21:50:13 »
I'm not aware of 'effectstandplay' animation  ???
However, I do know the "EffectStandTalk" animation, which you can use in a on activation field or in a script. If you have a cutscene you're working on and a script for it you can do a nice loop for the animation to last for as long as you want.

;STATE VARIABLE
_loopcount = 0
#start

;CHECK VARIABLE TO EXIT
?_loopcount == 10: exit

;HAVE CIVILIANS PERFORM THE PLAYMOVE
civ1 playmove "effectstandtalk"; civ2 playmove effectstandtalk"
;WAIT FOR 4 SECONDS TO COMPLETE THE PLAYMOVE ANIMATION
~4

;INCREASE VARIABLE BY 1
_loopcount = _loopcount +1

;BEGIN LOOP AGAIN FROM START
goto "start"



if you're not using a script but a trigger and you only need them to talk for a short time, then
unitname playmove "effectstandtalk"
is fine.
Not all is lost.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Using PlayMove ""
« Reply #2 on: 28 May 2006, 21:54:33 »
just as you have described, really. name the units you wish to animate, and use the command

Code: [Select]
unit_name playmove "EffectStandTalk"
a couple of notes. some animations require units to be in safe mode before they'll work. in the init line of the unit type

Code: [Select]
this setbehaviour "safe"
also, animations generally don't work from the init field, so you'll have to either create a trigger with the animation commands in the 'on activation' field, or create a script with the commands in, and run that from a trigger.

Offline Evan Scown

  • Members
  • *
Re: Using PlayMove ""
« Reply #3 on: 29 May 2006, 08:20:44 »
Yeh, EffectStandTalk....that's what I was meaning...it was late-ish at night so LOL...ok so from what I gather, in the mission editor in that init line thingy when you click on a unit they have to have the this setbehaviour to "safe" and the unit_name playmove "EffectStandTalk" goes where?


Edit: Not in cut scene, I just want them talking all game

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Using PlayMove ""
« Reply #4 on: 29 May 2006, 09:31:53 »
talking all game, use artak's method above. copy and paste the code into notepad, save the file as animate.sqs in the same mission folder as the briefing and the init.sqs and mission.sqm files.

in the init file, use [] exec "animate.sqs" and the units called civ1 and civ2 with chat all through the mission. if they're called something else, be sure to change those bits of artak's script.

EDIT - if there's a chance the units could be killed during the mission, you might want to check for them being alive. slight modification...

Code: [Select]
;STATE VARIABLE
_loopcount = 0
#start

;CHECK VARIABLE TO EXIT
?_loopcount == 10: exit

;HAVE CIVILIANS PERFORM THE PLAYMOVE
?(alive civ1):civ1 playmove "effectstandtalk"
?(alive civ2):civ2 playmove "effectstandtalk"
;WAIT FOR 4 SECONDS TO COMPLETE THE PLAYMOVE ANIMATION
~4

;INCREASE VARIABLE BY 1
_loopcount = _loopcount +1

;BEGIN LOOP AGAIN FROM START
goto "start"
« Last Edit: 29 May 2006, 09:34:16 by bedges »

Offline Evan Scown

  • Members
  • *
Re: Using PlayMove ""
« Reply #5 on: 29 May 2006, 12:04:53 »
last thing i swear...they are doing the actions...but not looking at each other...they are both looking down...how do i get them to look @ each other?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Using PlayMove ""
« Reply #6 on: 29 May 2006, 12:28:25 »
Code: [Select]
civ1 dowatch civ2
civ2 dowatch civ1

although they will look at other things nearby as well as each other. if you want them to look only at each others' faces it will involve a wee bit of trigonometry and such to fake, although you could simply use

Code: [Select]
civ1 dowatch [getpos civ2 select 0, getpos civ2 select 1, 1.5]
civ2 dowatch [getpos civ1 select 0, getpos civ1 select 1, 1.5]

which will make them both watch an exact position.

and don't worry about asking questions - it's the reason the forum exists in the first place ;)
« Last Edit: 29 May 2006, 12:31:39 by bedges »

Offline Evan Scown

  • Members
  • *
Re: Using PlayMove ""
« Reply #7 on: 29 May 2006, 12:42:08 »
and that goes in the animate.sqs file i take it...right bellow the other code?

Offline 999chris

  • Members
  • *
  • I'm a llama!
Re: Using PlayMove ""
« Reply #8 on: 29 May 2006, 15:06:44 »
Oh FFS,.. Just name your civ's "civ1" and "civ2" respectfully...

Then make 2 Triggers:

Trigger 1 - Make the condition True and in the On Activation civ1 switchmove "EffectStandTalk"
Trigger 2 - Make the condition True and in the Min, Max and Mid Boxes put in a low number like 1 or 2 (This will give a short bit of time before the other civ starts the animation so when you seem them chatting they arent on the same frames of animation as each other (basically it wont look like one is talking into a mirror)) and then in the On Activaion civ2 switchmove "EffectStandTalk"

You could also make the Axis's (X and Y) of the triggers 0, you dont need them to be any size because they arent trying to detect anything.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Using PlayMove ""
« Reply #9 on: 29 May 2006, 15:47:34 »
Edit: Not in cut scene, I just want them talking all game

..which needs to be done in a script, and not a trigger, as has been noted already. Keep it civil, 999chris.  8)

As to your question : I suggest you put the dowatch ditty just ahead of the #start, that way you won't needlessly be using up resources to loop a command that only needs to be run once.

Have a good one.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline 999chris

  • Members
  • *
  • I'm a llama!
Re: Using PlayMove ""
« Reply #10 on: 29 May 2006, 16:19:37 »
Hence "SwitchMove" Ive always known it to loop.

Offline Evan Scown

  • Members
  • *
Re: Using PlayMove ""
« Reply #11 on: 29 May 2006, 23:51:25 »
Thankyou Wolfrug for that, much helpful. You answered my question as to where that piece of code went.
« Last Edit: 30 May 2006, 01:41:57 by bedges »

Offline RichUK

  • OFPEC Patron
  • ****
  • Have fun!
Re: Using PlayMove ""
« Reply #12 on: 30 May 2006, 01:47:17 »

Well, as it will be a while before the  Editors Depot is operational again, I thought I would just attach a zipped Animations Demo mission from 2004 by macguba and ponq, which I have personally found invaluable to work out what animations to use with either switchmove or playmove.

It was more than likely built for a different island, as I remember modifying this version to be set to run on Nogova.  I have just tested it under OFP version 1.91 under which it works fine, and I am sure it is fine under v1.96 as well.

To try it, just unzip the attached Animations.Noe.zip file, which will create an Animations.Noe folder with the stuff in it.  Then copy the whole folder into your Flashpoint, as follows:


<path>\Codemasters\OperationFlashpoint\Missions\Animations.Noe


and/or, (probably more usefully) if you want to open it in the Editor under Nogova (and/or Preview it):


<path>\Codemasters\OperationFlashpoint\Users\<username>\Missions\Animations.Noe

The first of these, allows you to run Flashpoint and load it as a Single Mission, the second one allows you to open it under the Editor and preview it, and/or look in detail how it works.  It uses a dialog box at the top to go through the different animations, either automatically, or you can pick what you want to view, etc. (just play with it!).

I am sure that you will find it of help...  ;D

[attachment deleted by admin]