|
"Kill Me Like You Mean It, Dammit"
|
|
CODING
REBELS for XEN REBELS |
|
How
to Code Rebels for Xen Rebels The new Rebel will use the CTalkMonster class, like Barney and the Scientist. All of the Talk-Monster entities are friendly to players -- unless players hurt a Talk-Monster. 1. Start with a copy the monster code (eg. the Assassin source code). This is the basis of your new Rebel code. 2. Include every file that seems important in the Barney code that your Rebel code does not have. 3. Change all references from CSquadMonster (or CBasicMonster) to CTalkMonster. 4. Change all references to this monster to CMyMonster (in this example, CRebelAssassin). 5. Change the tasklists and other stuff renaming them. Add any missing variables found in the the barney code, but rename them. Change the variable thing that defines whether the monster is friendly or not ... I can't remember the name. They look like MONSTER_ALIEN_MILITARY or MONSTER_PLAYER_ALLY etc. You'll find it. Change that to player ally or rebel ally type. 6. Copy all necessary CTalkMonster tasklists and schedules from the BARNEY code to this new rebel entity. Try to add all the talkmonster things barney has to the rebel monster. Do not try to make your rebel to draw weapon etc though. Rename these copied things so they are with the rebel thing. 7. Sometimes the names of the monster and of your copied barney code interfere. Try to stuff your monster functions with the things found in barney code. 8. The whole thing is about keeping all the characteristic things of the monster. You just have to add the talkmonster and following feature (if desired). 9. Remember to compile the new server file (XR.DLL) and copy it into the "xenreb/dlls" directory. 10. Add a new entry in the XR.FGD file -- you can copy-and-paste Barney's entity definition, then change "monster_barney" to "monster_rebel_assassin". Then create and run a map using the Rebel. That's about it ... of course, your own imagination also needed. |
|
CODING
REBELS for XEN REBELS
|
|
"Handy
Vandal" and "Handy Vandal's Almanac" copyright 2008 by
Karl Gregory Jones Half-Life © 1998-99 Sierra On-line and Valve L.L.C. All rights reserved. Half-Life and the Half-Life logo are trademarks of Sierra On-Line. Valve and the Valve logo are trademarks of Valve L.L.C. Half-Life images, textures, music, sound effects, and other graphic or audio content © 1998-99 Valve L.L.C. All rights reserved. |