ballstriada.blogg.se

Do i need to play half life 1 to understand 2
Do i need to play half life 1 to understand 2









do i need to play half life 1 to understand 2
  1. #Do i need to play half life 1 to understand 2 mods#
  2. #Do i need to play half life 1 to understand 2 code#

Use TASK_WAIT to tell an NPC to do the next task AFTER the RUN or WALK_PATH tasks. NPCs use a GET_PATH system to understand where to go, while they use TASK_RUN_PATH or TASK_WALK_PATH to get there. There are tasks for each type of attack, as well as two NOTURN under each subtype. SCHED_COWER is something that the Scientist does a lot (after this tutorial, you can change that, though), and SCHED_TAKE_COVER_FROM_ENEMY, SCHED_TAKE_COVER_FROM_BEST_SOUND and SCHED_TAKE_COVER_FROM_ORIGIN are things all NPCs do (all self explanatory.) There's also SCHED_RELOAD for Marines. SCHED_COMBAT_FACE tells the NPC to look at something. The subtypes are differentiated between by 1 and 2 after the names (IE: SCHED_MELEE_ATTACK1 and SCHED_MELEE_ATTACK2). There are three types of attacks for each NPC, as well as two subtypes. More of these can be defined in each monster, or types of monsters. There's a list in the "schedules.h" file in the HLSDK's dlls folder. There are too many of either of these to mention, but the following two paragraphs contains a few notable ones. Tasks are the steps in each schedule for him to complete his goal. Schedules are what the NPC wants to do, depending on his mood and certain set conditions. Script is for Scripted Sequences and stuff. Prone is done when barnacles are eating their victims. These are all pretty self-explanatory except for Script and Prone. In the default HLSDK, these were MONSTERSTATE_NONE, MONSTERSTATE_IDLE, MONSTERSTATE_COMBAT, MONSTERSTATE_ALERT, MONSTERSTATE_HUNT, MONSTERSTATE_PRONE, MONSTERSTATE_SCRIPT, MONSTERSTATE_PLAYDEAD, and MONSTERSTATE_DEAD. This is a system that Half Life uses to make NPC development easier and cleaner, as well as more efficient and better.Ī monster state is how a monster feels.

do i need to play half life 1 to understand 2

Now, on to the topic of Monster States, Schedules and Tasks.

#Do i need to play half life 1 to understand 2 code#

For example, the code first tells the NPC to play a shooting animation, and then uses events to trigger certain.events. Now, these NPCs usually use models (the visual representation of the NPCs) and send signals back and forth from the code to the models. Artificial Intelligence is the code behind it. They can be Marines, Scientists, aliens or even the cockroaches you see.

#Do i need to play half life 1 to understand 2 mods#

Without them, SP mods would be fairly bland (except if you're going for an Amnesia feel). The world of coding starts here!So, first let's have an introduction to two things - what are NPCs and how they work, and what is the state/schedule/task system.











Do i need to play half life 1 to understand 2