Home   Help Search Login Register  

Author Topic: Another Basic Question  (Read 1512 times)

0 Members and 1 Guest are viewing this topic.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Another Basic Question
« on: 13 Nov 2004, 20:51:06 »
In a cutscene want to have a soldier walking, he stops, gets his weapon ready and the fires a burst from his gun.  So far I get him to do all that EXCEPT FIRE HIS GUN!

the code I am using is:
Code: [Select]
murderer switchMove "CivilWalkF"
~1
murderer switchMove "EffectStand"
~0.5
murderer switchMove "StandToCombat"
~1.75
murderer switchMove "CombatStillPlayer"

murderer doFire civil1

civil1 is a civilian.

He only fires his gun after the cutscene has ended and even then only in single shots.

I have tried getting him to doFire at other objects and I have tried:
murderer Fire "M16"

None of this works.

Again - I must be missing something simple.
« Last Edit: 13 Nov 2004, 20:51:54 by THobson »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Another Basic Question
« Reply #1 on: 13 Nov 2004, 22:14:14 »
perhaps it's because he is still "switchmoving"

I would think you should be using playmove for all of this
1)i imagine he gets clippy every time he switchmoves, and playmove would make it more fluent
2)if you use playmove, he will probably fire because that finishes as soon as he does it
although i may be talking rubbish
« Last Edit: 13 Nov 2004, 22:14:52 by Triggerhappy »

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Another Basic Question
« Reply #2 on: 13 Nov 2004, 23:08:00 »
Eg.... getting guys to fire at an exact time is... difficult at best. The switchmove thing might help, but I'm not too sure about it. All I can suggest is that you try to "help" the murderer attack the target, by using the "dowatch" and "reveal" commands, as well as setting his skill to the maximum.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Another Basic Question
« Reply #3 on: 14 Nov 2004, 07:46:53 »
Oh good.  My one questin has now become two!

Q1:
So what is the difference between switchmove and playmove?  I really don't notice much difference in the excellent animations 'mission' by macguba and ponq.  In fact playmoves don't seem to exist for all the moves anyway so I have not really looked seriously at them

Q2:
It is essential that the guy fires within a short preiod of time  (say within a second) of when I want him to.   I don't think reveal will help, the person being shot at is a civilian (I know I could make them an enemy that looks like a civilian, but that would cause problems elsewhere.).   I could cut away and just hear the sound of the shooting but when I use   Fire "m16" I get only a single shot.  How can I make that into a burst?


Another oprton is to setPos an enemy in front of him but out of camera and then setPos the body away.  I was hoping to avoid something so clumsy.
« Last Edit: 14 Nov 2004, 07:47:36 by THobson »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Another Basic Question
« Reply #4 on: 14 Nov 2004, 16:20:07 »
i remember a solution to this problem, i've had it before, for the civilian, use setcaptive false, he'll be gunned down in a second, at least he was for me, but i was using east soldiers to kill the civs, and you are using another civilian, aren't you?

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Another Basic Question
« Reply #5 on: 14 Nov 2004, 19:21:52 »
I am still interested in the difference between switchMove and playMove.  I can find no use for the latter.

Triggerhappy:  Thanks.  I have units on Guard that must not be triggered by this cut scene - I don't know if set captive false for civilian will do that.  I know set captive true for an enemy will still cause the guards to head their way.  

I digress.  I have now got a solution to my problem.  It sounds more complicated than it is and it looks good.

Watch the civilian run
cut to soldier getting ready and taking aim
cut to civilian running
setPos a new soldier to just off camera
setPos the old soldier away
get the new soldier to Fire "M16" a couple of times
(for some reason the old soldier will not do this)

Previously having done an addAction "Fired" for the new soldier that sets dammage 1 for the civilian.

Perfect result

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:Another Basic Question
« Reply #6 on: 15 Nov 2004, 00:08:56 »
Don't take this as gospel but there are anims that are just that - dynamic animations - and others that arre simply 'poses' (like a lot of the FX anims).

The logic ought to be that PlayMove plays a true 'animation' while SwitchMove is an instant change to the 'pose' but, as you have seen it's a bit fuzzier than that.  Some anims are said to work with only one of the two commands so the only real advice is if one command doesn't work, try the other!

Ah - this could be important/useful:  I believe PlayMove behaves like the the other Play... commands in that you can issue a series of PlayMove commands on a unit (without pauses) that are are stacked and played sequentially.  So if you go:

bloke PlayMove "anim1"
bloke PlayMove "anim2"

. . . he will complete anim1 before executing anim2.

Break it with bloke PlayMove "null" (or null??)

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Another Basic Question
« Reply #7 on: 15 Nov 2004, 08:15:46 »
Thanks.  I am approaching this in a try-it-and-see sort of way.  It takes ages as a result.  I think some of the switchmoves stack as well.  I have a soldier walking and a civilian running and the more switchMove "civilwalk" (or whatever - I am at work now and cannot check the exact name) and switchMove "civilRun" (ditto) I give them the longer they keep going.

When I look at playmoves they either seem not to exist or to be over in  flash - so I don't really see the point.  Or more precisely I must be missing the point.

While on the subject of Basic questions:
If you place a unit on the map he starts with his gun pointing down (I don't know the correct military term).  He is not taking aim and he does not have the gun on his back.  How do I make a solder change so that he stands like that in a cutscene (he is the player and the most likely configuration at the start of the scene will be him taking aim)?  I have been through the animations mission by macguba and ponq till my eyes hurt, but I must have missed it.

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:Another Basic Question
« Reply #8 on: 15 Nov 2004, 13:05:39 »
The instant poses are just for effect (hence the FX tag).  Good examples are the 'surrender' ones - you can set a unit to have his hands up for story purposes but you can't watch him put them up.

The default state (Behaviour) is 'Aware' in the OFP world, which I would've termed the 'alert' in the real on. So if you unit SetBehaviour "AWARE", he should start in the alert.  Not sure what the anim term for this is, though.

To get his gun in the shoulder (ready) is a bit tricky without a valid target, but you could try:
unit SetUnitPos "UP"
unit SetBehaviour "COMBAT"

But, as you said, try it and see!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Another Basic Question
« Reply #9 on: 15 Nov 2004, 13:42:51 »
Thanks.  I am able to get the gun up, what I can't seem to do is to retrun the player to the default AWARE stance during a cutscene

ocnick

  • Guest
Re:Another Basic Question
« Reply #10 on: 15 Nov 2004, 16:16:58 »
I remember having similar problems when trying to get someone to shoot a civi.  If I remember right, I solved it by adding an OPFOR unit as his leader with deletevehicle in the civi's init line.  You'll probably have to add some hold fire and setunitpos commands to keep your "murderer" from acting like an enemy is around.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Another Basic Question
« Reply #11 on: 15 Nov 2004, 16:58:01 »
Thanks.  I fear that this would have all my Guard groups doing inappropriate things also.  I now have a work around for the shooting part

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Another Basic Question
« Reply #12 on: 16 Nov 2004, 22:52:56 »
Q1:
So what is the difference between switchmove and playmove?  I really don't notice much difference in the excellent animations 'mission' by macguba and ponq.  In fact playmoves don't seem to exist for all the moves anyway so I have not really looked seriously at them

Playmove makes a smooth transition from the unit's current animation into the one you want. A good example would go like this:
Let's say a unit is prone with his pistol out
The command unit playmove "combat" would make him stand up and pull his rifle off his shoulder
The command unit switchmove "combat" would make him instantly appear standing with his rifle out

The game has to know how to go from anim A to anim B to anim C, and these "transitions" are defined in the config. Some animations don't have any "transitions" connecting them to other animations, so you have to use switchmove to get them to work.

Also, as ACF said, you can "stack" animations via playmove, but not via switchmove.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Another Basic Question
« Reply #13 on: 17 Nov 2004, 14:16:55 »
Thanks.  I might be able to get some of the jerkiness out of my cutscene now.

Does the point about not being able to stack switchmoves apply to all of them?  I am sure I am stacking the civilWalk and civilRun  (may not be their exact names) switchMoves.  I have a loop that a series of them with no delay between and the more time through the loop the further the unit moves.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Another Basic Question
« Reply #14 on: 17 Nov 2004, 22:10:14 »
Quote
I have a loop that a series of them with no delay between and the more time through the loop the further the unit moves.


Hmm... not sure about that. Perhaps I'm wrong on the whole "stacking" of animations issue.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!