How to enable collisions in skeleton animations

Users who are viewing this thread

I have made a skeleton animation and imported it into the game via modding kit. then I have modified action_sets.xml and action_types.xml

I add following code into action_sets.xml:
<action type="act_yizizhan" animation="release_direct_fist" />
And I add following code into action_types.xml:
<action name="act_yizizhan" type="actt_release_melee" usage_direction="ud_attack_up" action_stage="as_attack_release" />
Then I add a C# class Inherited the MissionLogic class:
public class AgentYizizhanLogic : MissionLogic
{

public static readonly ActionIndexCache[] Actions = new ActionIndexCache[1]
{
ActionIndexCache.Create("act_yizizhan")
};
public override void OnMissionTick(float dt)

{
base.OnMissionTick(dt);

if (Input.IsKeyPressed(InputKey.Q) && Agent.Main != null)
{
Agent.Main.SetActionChannel(0, Actions[0]);
}
}
}
And add it via addMissionBehavior:
mission.AddMissionBehavior((MissionBehavior)new AgentYizizhanLogic());
Now my character could do this action when I press the Q key, but it can't collide with other agents. How should I make this action hit someone and cause damage without replacing the original attack action?
 
Back
Top Bottom