how to change monster's attack ?
Posted: Wed Dec 26, 2012 11:43 am
hi all,
I'm trying to make a custom monster with the skeleton warrior base.
I want to change the melee attack to a range attack (power bolt). I changed monsters.lua with brain=ranged and rangedAttack = "lightning_bolt" but it don't works... I can see the skeleton attack at distance (then the range attack works) but there is no lighting bolt...
What did I forgot please ?
my script into monsters.lua :
I'm trying to make a custom monster with the skeleton warrior base.
I want to change the melee attack to a range attack (power bolt). I changed monsters.lua with brain=ranged and rangedAttack = "lightning_bolt" but it don't works... I can see the skeleton attack at distance (then the range attack works) but there is no lighting bolt...
What did I forgot please ?
my script into monsters.lua :
SpoilerShow
defineObject{
name = "skeleton_ghost",
class = "Monster",
model = "mod_assets/models/monsters/skeleton_ghost.fbx",
meshName = "skeleton_warrior_mesh",
animations = {
idle = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_idle.fbx",
moveForward = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_walk.fbx",
turnLeft = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_turn_left.fbx",
turnRight = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_turn_right.fbx",
attack = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_attack.fbx",
attackBack = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_attack_back.fbx",
getHitFrontLeft = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_front_left.fbx",
getHitFrontRight = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_front_right.fbx",
getHitBack = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_back.fbx",
getHitLeft = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_left.fbx",
getHitRight = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_right.fbx",
fall = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_front_left.fbx",
},
lightName = "hip",
lightColor = vec(0.3, 0.3, 0.4),
lightBrightness = 20,
lightRange = 1.5,
allAroundSight = true,
seeInvisible = true,
flying = true,
turnAnimSpeed = 7,
moveSound = "skeleton_walk",
footstepSound = "skeleton_footstep",
attackSound = "skeleton_attack",
hitSound = "skeleton_hit",
dieSound = "skeleton_die",
hitEffect = "hit_dust",
capsuleHeight = 0.7,
capsuleRadius = 0.25,
collisionRadius = 0.6,
health = 160,
sight = 6,
attackPower = 25,
rangedAttack = "lightning_bolt",
--accuracy = 10,
protection = 5,
immunities = { “poison”, “fire”, “cold” },
movementCoolDown = 0.3,
noRecoilInterval = { 0.25, 0.5 },
exp = 350,
healthIncrement = 15,
attackPowerIncrement = 5,
protectionIncrement = 1,
--brain = "Melee",
brain = "Ranged",
particleSystem = "ghostsk",
particleSystemNode = "head",
}
name = "skeleton_ghost",
class = "Monster",
model = "mod_assets/models/monsters/skeleton_ghost.fbx",
meshName = "skeleton_warrior_mesh",
animations = {
idle = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_idle.fbx",
moveForward = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_walk.fbx",
turnLeft = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_turn_left.fbx",
turnRight = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_turn_right.fbx",
attack = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_attack.fbx",
attackBack = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_attack_back.fbx",
getHitFrontLeft = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_front_left.fbx",
getHitFrontRight = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_front_right.fbx",
getHitBack = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_back.fbx",
getHitLeft = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_left.fbx",
getHitRight = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_right.fbx",
fall = "assets/animations/monsters/skeleton_warrior/skeleton_warrior_get_hit_front_left.fbx",
},
lightName = "hip",
lightColor = vec(0.3, 0.3, 0.4),
lightBrightness = 20,
lightRange = 1.5,
allAroundSight = true,
seeInvisible = true,
flying = true,
turnAnimSpeed = 7,
moveSound = "skeleton_walk",
footstepSound = "skeleton_footstep",
attackSound = "skeleton_attack",
hitSound = "skeleton_hit",
dieSound = "skeleton_die",
hitEffect = "hit_dust",
capsuleHeight = 0.7,
capsuleRadius = 0.25,
collisionRadius = 0.6,
health = 160,
sight = 6,
attackPower = 25,
rangedAttack = "lightning_bolt",
--accuracy = 10,
protection = 5,
immunities = { “poison”, “fire”, “cold” },
movementCoolDown = 0.3,
noRecoilInterval = { 0.25, 0.5 },
exp = 350,
healthIncrement = 15,
attackPowerIncrement = 5,
protectionIncrement = 1,
--brain = "Melee",
brain = "Ranged",
particleSystem = "ghostsk",
particleSystemNode = "head",
}