Dynamic interactions

From Valve Developer Community
Revision as of 00:45, 26 February 2012 by Gjsdeath (talk | contribs) (Ugh. I spent all that time... and I forgot to add it to the QC Keyvalues category...)
Jump to navigation Jump to search
Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The user who added this notice, should you wish to contact them, is: Gary tr = idir.

The dynamic_interactions KeyValues block defines when and how to perform a dynamic interaction. For example; when Alyx kicks a zombie. It is embedded in a model with the $keyvalues QC command.

Warning.pngWarning: This page is not done yet, all the information on it has not been confirmed!! I will be working on it for the next one or two days. If you want to confirm or add something, please add it to the discussion page for now. All the "confirms" are there because I just assumed a lot of those descriptions. My assumptions were based on the names and the code that they use.


Example

 $keyvalues 
 { 
 
	dynamic_interactions 
	{

		"alyx_v_zombie_180deg_64" 
		{ 
		"trigger" "auto_in_combat" 
		"origin_relative" "64 0 0" 
		"angles_relative" "0 180 0" 
		"activity" "ACT_DI_ALYX_ZOMBIE_MELEE"
		"delay" "10.0" 
		"needs_weapon" "ME" 
		"weapon_mine" "weapon_alyxgun" 
		}   
 
	}
 }

Options

Note.pngNote: The "partner" is the character that this character is interacting with.
trigger <choices>
What triggers this interaction...
auto_in_combat
Automatically in combat.
loop_break_trigger <choices>
Stop looping the action animation if loop_in_action was set.
Todo:  Find out what exactly this does...
on_damage
Break loop on damage.
Todo:  Confirm.
on_flashlight_illum
Break loop once illuminated by player's flashlight.
Todo:  Confirm.
origin_relative <vector>
angles_relative <angles>
velocity_relative <vector>
entry_sequence <sequence>
What sequence to play for this interaction before the main sequence/activity.
Todo:  Confirm.
entry_activity <activity>
What activity to play for this interaction before the main sequence/activity.
Todo:  Confirm.
sequence <sequence>
What sequence to play for this interaction.(The "action")
activity <activity>
What activity to play for this interaction.(The "action")
exit_sequence <sequence>
What sequence to play for this interaction after the main sequence/activity.
Todo:  Confirm.
exit_activity <activity>
What activity to play for this interaction after the main sequence/activity.
Todo:  Confirm.
delay <float>
The delay... before starting the interaction?
Todo:  Confirm.
origin_max_delta <float>
Something to do with delta animation...
Todo:  Confirm.
loop_in_action <float>
Note.pngNote: While the value is a float, it's used as a bool in code.
Loop in the "action" animation(the "activity" or "sequence" options.).
Todo:  Confirm.
dont_teleport_at_end <choices>
Don't teleport/fix up positions at the end
Todo:  Find out what exactly this does...
me
Don't teleport/fix up this character's position
Todo:  Confirm.
them
Don't teleport/fix up this character's partner's position
Todo:  Confirm.
both
Don't teleport/fix up this character's or his partner's position
Todo:  Confirm.
needs_weapon <choices>
Needs a weapon to perform this interaction?
ME
Does this character need a weapon?
Todo:  Confirm.
THEM
Does this character's partner need a weapon?
Todo:  Confirm.
BOTH
Does both this character and his partner need a weapon?
Todo:  Confirm.
weapon_mine <classname>
This character needs this specific weapon to perform this interaction?
Todo:  Confirm.
weapon_theirs <classname>
This character needs this specific weapon to perform this interaction?
Todo:  Confirm.

Related or Useful Animation Events

These are useful animation events for those wanted to create an activity for a dynamic interaction. READ: Animation_Events

Todo:  Move to dedicated page or animation event page?


Example

{ event AE_NPC_HURT_INTERACTION_PARTNER 28 "THEM 100" }


Animation Events

AE_NPC_HURT_INTERACTION_PARTNER "<choices> <int>"
Hurt either this character or his partner... and how much(the int).
ME
Hurt this character
Todo:  Confirm: Works?
THEM
Hurt the partner
AE_NPC_SET_INTERACTION_CANTDIE "<bool>"
Set those participating in the interaction to become invincible
Todo:  Which NPC? The partner or this character
AE_NPC_WEAPON_FIRE "<bool>"
Fire this character's weapon. The bool is whether or not you want him to use the weapon's secondary fire.


See Also