- DAXON'S PAGE
- PERSO'S PAGE
- SGI'S PAGE
- SLADER'S PAGE
- VASJA'S PAGE
- TPTPT'S PAGE
- 01 - Get the good size
- 02 - Prepare the structure
- 03 - Textures
- 04 - Build the Skeleton
- 05 - Create new members
- 06 - Used Chiliskiner for rebuild skeleton
- 07 - Link skeleton
- 08 - Orientation of menbers
- 09 - Create Anchor
- 10 - Orientation of Anchor
- 11 - Link Anchor
- 12 - Finalise the character
- 13 - Add Edge for natural weapon
- PROSPERO'S PAGE
- 01 - Starting
- 02 - Stopping 'Ice Skating'
- 03 - A bit of boring theory
- 04 - Adding objects
- 05 - Weapons
- 06 - Enemies
- 07 - Controling enemies
- 08 - Trigger Sectors
- 09 - Cutscenes and camera stuff
- 10 - Sounds
- 11 - Doors
- 12 - De-bugging
- 13 - Sun, Water, Footsteps
- 14 - Gates
- 15 - Death of Enemies
- 16 - Classes
- 17 - Traps
- 18 - Torches
- 19 - New Races
- 20 - A Painless Way to Install New Objects
- 01 - BOD and 3DSMAX 2.5
- 02 - BOD and 3DSMAX 2.5
-
NEW CHARACTER TUTORIAL
-
BOD PYTHON SCRIPTING
BOD Python Scripting
06 - Enemies
Enemies are created in exactly the same way as objects, but they all have the entity class "Person". They will always stay on the ground and will always remain upright (until you kill them). They don't have an Orientation attribute, instead they have an 'Angle'. An Angle of 0 will make them face North in the map, going counter-clockwise to 6,285308.
You should not alter their Scale. I think you can make them smaller, but you cannot make them bigger.
I usually have them in a seperate *.py file, enemies.py. Exec this file in cfg.py as with objs.py. Don't name your file 'Enemies.py' or 'enemies.py'. As with 'Objects', there is a BOD source file with this name.
I like to give each enemy their own variable, usually a lowercase version of the individual name:
ork1=Bladex.CreateEntity("Ork1",Ork,x, z, y,"Person")When you have lots of baddies running about you will appreciate the value of this.
To enable the AI, enemies need a lot of data. Assign this with:
EnemyTypes.EnemyDefaultFuncs(ork1) # import EnemyTypesEnemies need weapons. Apart from the ones that naturally fight with no weapons, (Golems, Demons, etc), they have no collision edges in the mesh for unarmed combat and no data to handle it anyway. If you don't arm them they will just run about in confusion. Also DO NOT try giving them Two-Handed stuff. It will crash the game when they try to move.
Create their weapons/shields in the usual manner Coords, don't matter here, just use 0,0,0,. Don't forget the ItemDefaultFuncs code on shields and bows/quivers. To make nice neat code I name the weapons of an enemy the same as the enemy but with WP on the end for weapons, SH for shields.
0nce you have their kit created you need to get them to take it. There is a handy function in file Actions.py that handles this:
Actions.TakeObject("Ork1","Ork1WP") Actions.TakeObject("Ork1","Ork1SH") # import ActionsNow they are all set to rock'n'roll.
If you want to use Player characters as enemies you need to create a data class and combat charts for them. I won't go into that at the mo.
One complication is "DalGurak". He has two phases. He will start in phase1 where he will teleport about and throw stuff at you. This phase needs scripting to assign him teleportation coords. The answer is to start him in his melee phase:
dal1.Data.Phase=2Same applies to the "DarkLord". He needs loads of scripting with his existing data, coords for teleporting, meteorites, etc. His whole class data needs rewriting in order to use him simply. I won't dwell a that for now.
The 'Kind' names for enemies are:
Ork Great_Ork Knight_Traitor Dark_Knight Knight_Zombie Lich # Mummy type guys Cos # Little pink critters Spidersmall Skeleton Little_Demon Vamp Minotaur Troll_Dark Troll_snow Ragnar Salamander ChaosKnight DalGurak Golem_stone Golem_clay Golem_lava Golem_metal Great_Demon DarkLord