Mutant Monster Vortigaunt - PowerPoint PPT Presentation

About This Presentation
Title:

Mutant Monster Vortigaunt

Description:

To implement a crazy monster that attacks the player violently. ... Capable of range attack and melee attack, a loyal friend of the player that ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 11
Provided by: eecsNort
Category:

less

Transcript and Presenter's Notes

Title: Mutant Monster Vortigaunt


1
Mutant Monster Vortigaunt
  • Ming Yang

2
Outline
  • Goal
  • Crazy monster vortigaunt
  • Custom NPC
  • Sub-system of AI
  • NPC vortigaunt
  • Damage system
  • Demo

3
Goal
  • To implement a crazy monster that attacks the
    player violently.
  • To implement a custom NPC based on custom
    modeling.

4
Challenges
  • The AI and NPC systems are huge.
  • The functionalities are distributed in the class
    hierarchy tree. Some latent constraints are hard
    to find.

5
Results
  • Convert the friendly ally monster vortigaunt into
    a crazy killer.
  • Create a custom NPC npc_cube based on Zachs
    modeling (why it cannot think?)

6
NPC vortigaunt
  • Capable of range attack and melee attack, a loyal
    friend of the player that attacks the players
    enemy and heal the player.
  • Set the player to be the enemy of vortigaunt is
    forbidden.
  • The damage of vortigaunts attack to the player
    will be filtered.

7
Custom schedule
  • Detect the player and trigger the attack
  • Add modules in SelectSchedule().
  • Implement 2 kinds of custom schedules
  • SCHED_VORTIGAUNT_MELEE_ATTACK_PLAYER
  • SCHED_VORTIGAUNT_RANGE_DODGE

8
Damage System
  • Class CTakeDamageInfo wraps the damage info
    including the attacker, damage, damage force,
    damage position et al.
  • Attacker generates CTakeDamageInfo objects and
    calls the victims TakeDamage() to send the
    damage and the victim responses it in
    OnTakeDamage().

9
Damage filter
  • The damage sent to the player will be filtered in
  • CBasePlayerTraceAttack
  • CBasePlayerOnTakeDamage
  • CHL2_PlayerPassesDamageFilter
  • CTeamplayRules will test if the attacker is
    teammate or ally.
  • g_pGameRules-gtFPlayerCanTakeDamage
  • CTeamplayRulesFPlayerCanTakeDamage

10
Demo
  • Run run_mod.bat
  • Test the npc with console commands
  • Npc_create npc_vortigaunt
  • Npc_create npc_cube
Write a Comment
User Comments (0)
About PowerShow.com