Hi this is the new Ghost code if anyone needs it. It works for me. I hope this is correct guys.
Code: Select all
defineObject{
name = "skeleton_archer_ghost",
baseObject = "base_monster",
components = {
{
class = "Model",
model = "assets/models/monsters/skeleton_archer.fbx",
material = "skeleton_bow_ghost", ---overrides original texture--
storeSourceData = true,
},
{
class = "Animation",
animations = {
idle = "assets/animations/monsters/skeleton_archer/skeleton_archer_idle.fbx",
moveForward = "assets/animations/monsters/skeleton_archer/skeleton_archer_walk.fbx",
strafeLeft = "assets/animations/monsters/skeleton_archer/skeleton_archer_strafe_left.fbx",
strafeRight = "assets/animations/monsters/skeleton_archer/skeleton_archer_strafe_right.fbx",
turnLeft = "assets/animations/monsters/skeleton_archer/skeleton_archer_turn_left.fbx",
turnRight = "assets/animations/monsters/skeleton_archer/skeleton_archer_turn_right.fbx",
attack = "assets/animations/monsters/skeleton_archer/skeleton_archer_attack.fbx",
attackBack = "assets/animations/monsters/skeleton_archer/skeleton_archer_attack.fbx",
getHitFrontLeft = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_front_left.fbx",
getHitFrontRight = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_front_right.fbx",
getHitBack = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_back.fbx",
getHitLeft = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_left.fbx",
getHitRight = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_right.fbx",
fall = "assets/animations/monsters/skeleton_archer/skeleton_archer_get_hit_front_left.fbx",
},
currentLevelOnly = true,
},
{
class = "Monster",
meshName = "skeleton_archer_mesh",
footstepSound = "skeleton_archer_footstep",
hitSound = "skeleton_hit",
dieSound = "skeleton_die",
hitEffect = "hit_dust",
capsuleHeight = 0.7,
capsuleRadius = 0.25,
collisionRadius = 0.6,
health = 120,
protection = 5,
immunities = { "poisoned", "sleep", "blinded" },
resistances = { ["poison"] = "immune" },
traits = { "undead" },
exp = 90,
headRotation = vec(90, 90, 0),
},
{
class = "SkeletonArcherBrain",
name = "brain",
sight = 6,
},
{
class = "MonsterMove",
name = "move",
sound = "skeleton_walk",
cooldown = 2,
},
{
class = "MonsterTurn",
name = "turn",
sound = "skeleton_walk",
},
{
class = "MonsterAttack",
name = "rangedAttack",
attackType = "projectile",
attackPower = 14,
cooldown = 4,
animation = "attack",
sound = "skeleton_archer_attack",
shootProjectile = "cold_arrow",
projectileHeight = 1.35,
},
},
}
defineMaterial{
name = "skeleton_bow_ghost",
diffuseMap = "assets/textures/monsters/skeleton_warrior_bow_dif.tga",
specularMap = "assets/textures/monsters/skeleton_warrior_bow_spec.tga",
doubleSided = false,
lighting = true,
alphaTest = false,
blendMode = "Additive",
textureAddressMode = "Wrap",
glossiness = 20,
depthBias = 0,
}