Platformer Attack System
Platformer Attack System
Section titled “Platformer Attack System”Jump Attack Concept
Section titled “Jump Attack Concept”Platformer games require a special attack mechanic where players can damage enemies by jumping on them. This creates unique combat flow where aerial positioning becomes a tactical element.
Enemy Jump Hit Detection
Section titled “Enemy Jump Hit Detection”AI Character Setup
Section titled “AI Character Setup”Add collision detection for jump attacks on AI characters:
Jump Hit Collision
Section titled “Jump Hit Collision”- Component: Box Collision named “Jump_Hit”
- Position: Above enemy character head (Z location ~90)
- Scale: Z scale 0.25 for thin detection zone
- Collision Settings: Custom collision, ignore all, overlap pawn only
Collision Event Setup
Section titled “Collision Event Setup”// Jump Hit Begin Overlap EventOnJumpHitBeginOverlap(OtherActor) {if (character_is_falling && player_z_location > enemy_z_location) {deal_damage_to_enemy;play_player_jump_animation;launch_player_upward;}}
Player Character Interface
Section titled “Player Character Interface”Jump Hit Interface Function
Section titled “Jump Hit Interface Function”Create interface function for jump attack response:
- Function:
Interface_Jump_Hit_Montage
- Purpose: Plays backflip animation when jump attack succeeds
- Animation: Backflip montage with rate scale 2.0 for snappy feel
Attack Validation Conditions
Section titled “Attack Validation Conditions”Multi-Layered Validation
Section titled “Multi-Layered Validation”Implement multiple checks to prevent accidental triggers:
Player State Checks
Section titled “Player State Checks”- Falling Check: Verify player character is falling (not walking/running)
- Position Check: Confirm player is above enemy (Z location comparison)
- Velocity Check: Ensure player has negative Z velocity (falling downward)
Implementation Logic
Section titled “Implementation Logic”// Validation sequenceif (other_actor.is_player) {if (character_movement.is_falling) {if (player_z_location > enemy_z_location) {if (player_z_velocity < 0) {execute_jump_attack;}}}}
Animation Integration
Section titled “Animation Integration”Backflip Animation Setup
Section titled “Backflip Animation Setup”Configure backflip animation for jump attacks:
Mixamo Animation
Section titled “Mixamo Animation”- Animation: Backflip animation with feet landing in same position
- Import: Standard X Bot skeleton import process
- Montage: Create animation montage for gameplay integration
Montage Sections
Section titled “Montage Sections”Create animation sections for precise control:
- Jump_Start: Beginning of backflip motion
- Jump_End: Landing portion of animation
- Section Separation: Use “Clear” button to separate sections
- Starting Section: Set to “Jump_Start” for partial animation play
Animation Timing
Section titled “Animation Timing”- Rate Scale: 1.0 for proper timing (adjust from initial 2.0 testing value)
- Animation Slot: Full Body animation slot for complete character animation
- Interruption: Allow other animations to interrupt for fluid gameplay
Player Launch Mechanics
Section titled “Player Launch Mechanics”Launch Character Setup
Section titled “Launch Character Setup”Provide upward momentum after successful jump attack:
- Launch Strength: Z value 1200 units for satisfying bounce
- Override Z: Enable to ensure consistent upward launch
- Directional Launch: Purely vertical launch prevents unwanted horizontal movement
Damage Integration
Section titled “Damage Integration”Health Modification
Section titled “Health Modification”Jump attacks deal damage to enemies through existing health system:
- Damage Amount: Configurable damage value (typically moderate damage)
- Health Interface: Use existing Interface_Health_Modify system
- Damage Type: Subtract method for damage application
Enemy Response Animation
Section titled “Enemy Response Animation”Add hit reaction for visual feedback:
- Hit React Animation: “Hit React Behind” animation from Mixamo
- Enemy Montage: Create montage for enemy hit response
- Timing: Play after damage calculation completes
Platformer Mode Integration
Section titled “Platformer Mode Integration”Game Mode Variable
Section titled “Game Mode Variable”Create toggle system for platformer-specific mechanics:
- Platformer Boolean: Enable/disable platformer mechanics per character
- Default State: Set to true for platformer enemies, false for others
- Collision Control: Disable jump hit collision when platformer mode off
Multi-Game Mode Support
Section titled “Multi-Game Mode Support”Design system to work alongside other game modes:
- Conditional Activation: Only active when platformer variable enabled
- Mode Switching: Characters can be configured for different game modes
- Collision Management: Proper collision state management based on mode
The platformer attack system adds unique aerial combat mechanics while maintaining compatibility with other game modes through conditional activation.