Welcome, Guest Sunday 20th April 2014, 09:26:19
   Home   Help Search Login Register  

OFPEC Forum

Author Topic: Animation check  (Read 213 times)
0 Members and 1 Guest are viewing this topic.
Rellikki
*
Offline Offline



« on: 18 Feb 2010, 09:22:31 »

Is there a way to check when a character has performed a certain animation? Something like the animationPhase command, but for characters.
Logged

My stuff: Gameplay videos | Scripts for OFP editing

OFP will never die!
bedges
Administrator
*****
Offline Offline


WWW
« Reply #1 on: 20 Feb 2010, 08:36:43 »

As far as I know, there isn't. It depends on how the animation is being called. If it's in a script, even if the animations are randomised, could you not set a global variable when a particular animation is performed?

Difficult to say without more details.  Confused
« Last Edit: 20 Feb 2010, 08:38:59 by bedges » Logged
Rellikki
*
Offline Offline



« Reply #2 on: 20 Feb 2010, 12:58:47 »

Well, I'm creating a script to plant bombs and wanted to check when the player has performed the "putDown" animation, which is done from the action menu and only then createVehicle a bomb at his position. Sadly, it wouldn't be perfectly precise if I just createVehicle'd the bomb after one second delay from executing the animation, because sometimes it takes a little longer to perform that animation, depending on the player's initial stance - If he's laying on ground or standing. Depending on the case, the bomb would be created too early / later.

Yeah, everything has to be that perfect. Cheesy But if you say it's impossible, then I guess I can live with it. I wouldn't want to make it too complicated either. Just wanted to know if there's any simple way to check it.
« Last Edit: 20 Feb 2010, 13:09:56 by Rellikki » Logged

My stuff: Gameplay videos | Scripts for OFP editing

OFP will never die!
bedges
Administrator
*****
Offline Offline


WWW
« Reply #3 on: 20 Feb 2010, 13:19:11 »

If the "bomb" object is a regular satchel, one way around this would be to

  • get a list of the player's inventory
  • remove 2 magazines to create enough space for a satchel
  • add a satchel to the inventory
  • perform the 'put' action on the player, which iirc takes the stance into account
  • add the removed magazines back to the player's inventory

Possibly?

EDIT - nope, quick test reveals that for some bizarre reason you cannot run the 'fire' action on the player. Probably why Lukin planting satchels in that Red Hammer mission was done in cutscene style...
« Last Edit: 20 Feb 2010, 13:39:37 by bedges » Logged
Pages: [1]   Go Up
  Send this topicPrint  
 
Jump to: