[Asset] Splitting & spitting slimes of all sizes
Posted: Mon Nov 19, 2012 6:47 am
So, since I get new ideas all the time, I never seem to finish anything, but here goes:
I toyed around resizing slimes and tweaked them to be more varied and dangerous. I always wanted them to split into smaller slimes. Now they do!
Here's a short clip showing them in action
They split into smaller slimes on death, and they all differ in ways of attack and AI. The big one is truly annoying, ranged attack and all. I had to tone it down a bit.
Animation files (put these in mod_assets/animations):
http://speedy.sh/G6pCU/animations.rar
Code for animation_events.lua
Code for monsters.lua
Coming up:
Letting the big slime throw small slimes at the party. Try attacking him while he throws tiny slimes at you. First, sleep.
I toyed around resizing slimes and tweaked them to be more varied and dangerous. I always wanted them to split into smaller slimes. Now they do!
Here's a short clip showing them in action
They split into smaller slimes on death, and they all differ in ways of attack and AI. The big one is truly annoying, ranged attack and all. I had to tone it down a bit.
Animation files (put these in mod_assets/animations):
http://speedy.sh/G6pCU/animations.rar
Code for animation_events.lua
Code: Select all
defineAnimationEvent{
animation = "mod_assets/animations/big_slime/green_slime_attack.fbx",
event = "attack",
frame = 9,
}
defineAnimationEvent{
animation = "mod_assets/animations/big_slime/green_slime_attack_back.fbx",
event = "attack_back",
frame = 9,
}
defineAnimationEvent{
animation = "mod_assets/animations/big_slime/green_slime_attack_left.fbx",
event = "attack_left",
frame = 9,
}
defineAnimationEvent{
animation = "mod_assets/animations/big_slime/green_slime_attack_right.fbx",
event = "attack_right",
frame = 9,
}
defineAnimationEvent{
animation = "mod_assets/animations/quart_slime/green_slime_attack.fbx",
event = "attack",
frame = 9,
}
defineAnimationEvent{
animation = "mod_assets/animations/quart_slime/green_slime_attack_back.fbx",
event = "attack_back",
frame = 9,
}
defineAnimationEvent{
animation = "mod_assets/animations/quart_slime/green_slime_attack_left.fbx",
event = "attack_left",
frame = 9,
}
defineAnimationEvent{
animation = "mod_assets/animations/quart_slime/green_slime_attack_right.fbx",
event = "attack_right",
frame = 9,
}
defineAnimationEvent{
animation = "mod_assets/animations/half_slime/green_slime_attack.fbx",
event = "attack",
frame = 9,
}
defineAnimationEvent{
animation = "mod_assets/animations/half_slime/green_slime_attack_back.fbx",
event = "attack_back",
frame = 9,
}
defineAnimationEvent{
animation = "mod_assets/animations/half_slime/green_slime_attack_left.fbx",
event = "attack_left",
frame = 9,
}
defineAnimationEvent{
animation = "mod_assets/animations/half_slime/green_slime_attack_right.fbx",
event = "attack_right",
frame = 9,
}Code: Select all
defineObject{
name = "quart_4group",
class = "MonsterGroup",
monsterType ="quart_slime",
count = 4,
}
defineObject{
name = "quart_2group",
class = "MonsterGroup",
monsterType ="quart_slime",
count = 2,
}
cloneObject{
name = "quart_slime",
baseObject = "green_slime",
movementCoolDown = 2,
exp = 30,
health = 70,
brain = "Melee",
lightColor = vec(0.0, 0.5, 0.0),
lightBrightness = 4,
lightRange = 3,
attackPower = 1,
accuracy = 15,
coolDown = { 1, 2 },
animations = {
idle = "mod_assets/animations/quart_slime/green_slime_idle.fbx",
moveForward = "mod_assets/animations/quart_slime/green_slime_move_forward.fbx",
moveBackward = "mod_assets/animations/quart_slime/green_slime_move_backward.fbx",
strafeLeft = "mod_assets/animations/quart_slime/green_slime_strafe_left.fbx",
strafeRight = "mod_assets/animations/quart_slime/green_slime_strafe_right.fbx",
turnLeft = "mod_assets/animations/quart_slime/green_slime_turn_left.fbx",
turnRight = "mod_assets/animations/quart_slime/green_slime_turn_right.fbx",
attack = "mod_assets/animations/quart_slime/green_slime_attack.fbx",
attackBack = "mod_assets/animations/quart_slime/green_slime_attack_back.fbx",
attackLeft = "mod_assets/animations/quart_slime/green_slime_attack_left.fbx",
attackRight = "mod_assets/animations/quart_slime/green_slime_attack_right.fbx",
getHitFrontLeft = "mod_assets/animations/quart_slime/green_slime_get_hit_front_left.fbx",
getHitFrontRight = "mod_assets/animations/quart_slime/green_slime_get_hit_front_right.fbx",
getHitBack = "mod_assets/animations/quart_slime/green_slime_get_hit_back.fbx",
getHitLeft = "mod_assets/animations/quart_slime/green_slime_get_hit_left.fbx",
getHitRight = "mod_assets/animations/quart_slime/green_slime_get_hit_right.fbx",
fall = "mod_assets/animations/quart_slime/green_slime_get_hit_front_left.fbx",
},
}
cloneObject{
name = "half_slime",
baseObject = "green_slime",
movementCoolDown = 3,
exp = 90,
health = 200,
lightColor = vec(0.0, 1.0, 0.0),
lightBrightness = 5,
lightRange = 3,
attackPower = 10,
accuracy = 15,
animations = {
idle = "mod_assets/animations/half_slime/green_slime_idle.fbx",
moveForward = "mod_assets/animations/half_slime/green_slime_move_forward.fbx",
moveBackward = "mod_assets/animations/half_slime/green_slime_move_backward.fbx",
strafeLeft = "mod_assets/animations/half_slime/green_slime_strafe_left.fbx",
strafeRight = "mod_assets/animations/half_slime/green_slime_strafe_right.fbx",
turnLeft = "mod_assets/animations/half_slime/green_slime_turn_left.fbx",
turnRight = "mod_assets/animations/half_slime/green_slime_turn_right.fbx",
attack = "mod_assets/animations/half_slime/green_slime_attack.fbx",
attackBack = "mod_assets/animations/half_slime/green_slime_attack_back.fbx",
attackLeft = "mod_assets/animations/half_slime/green_slime_attack_left.fbx",
attackRight = "mod_assets/animations/half_slime/green_slime_attack_right.fbx",
getHitFrontLeft = "mod_assets/animations/half_slime/green_slime_get_hit_front_left.fbx",
getHitFrontRight = "mod_assets/animations/half_slime/green_slime_get_hit_front_right.fbx",
getHitBack = "mod_assets/animations/half_slime/green_slime_get_hit_back.fbx",
getHitLeft = "mod_assets/animations/half_slime/green_slime_get_hit_left.fbx",
getHitRight = "mod_assets/animations/half_slime/green_slime_get_hit_right.fbx",
fall = "mod_assets/animations/half_slime/green_slime_get_hit_front_left.fbx",
},
onDie = function(self)
local splitseed = math.random(3)
if splitseed == 3 then
spawn("quart_4group", self.level, self.x, self.y, self.facing)
elseif splitseed == 2 then
spawn("quart_2group", self.level, self.x, self.y, self.facing)
else
spawn("quart_slime", self.level, self.x, self.y, self.facing)
end
end,
}
cloneObject{
name = "normal_slime",
baseObject = "green_slime",
onDie = function(self)
spawn("half_slime", self.level, self.x, self.y, self.facing)
end,
}
cloneObject{
name = "big_slime",
baseObject = "green_slime",
movementCoolDown = 5,
moveSound = "slime_walk",
attackSound = "slime_attack",
hitSound = "slime_hit",
dieSound = "slime_die",
hitEffect = "hit_slime",
capsuleHeight = 0.5,
capsuleRadius = 0.9,
collisionRadius = 0.9,
health = 800,
immunities = { "assassination", "backstab" },
sight = 6,
allAroundSight = true,
attackPower = 35,
accuracy = 30,
coolDown = { 0.5, 4 },
evasion = -40,
noRecoilInterval = { 0.1, 0.5 },
exp = 400,
lightName = "light",
lightColor = vec(0.0, 4.0, 0.0),
lightBrightness = 10,
lightRange = 6,
healthIncrement = 50,
attackPowerIncrement = 5,
brain = "SkeletonArcher",
onAttack = function(self)
local dx,dy = getForward(self.facing)
local x,y = self.x + dx, self.y + dy
if self.facing == 0 or self.facing == 2 then
shootProjectile("green_gem", self.level, x, y, self.facing, 12, 8, 3, 0, 0, 0, math.random(15,25), nil, true)
else
shootProjectile("green_gem", self.level, x, y, self.facing, 12, 8, 3, 0, 0, 0, math.random(15,25), nil, true)
end
end,
onDie = function(self)
spawn("normal_slime", self.level, self.x, self.y, self.facing)
end,
animations = {
idle = "mod_assets/animations/big_slime/green_slime_idle.fbx",
moveForward = "mod_assets/animations/big_slime/green_slime_move_forward.fbx",
moveBackward = "mod_assets/animations/big_slime/green_slime_move_backward.fbx",
strafeLeft = "mod_assets/animations/big_slime/green_slime_strafe_left.fbx",
strafeRight = "mod_assets/animations/big_slime/green_slime_strafe_right.fbx",
turnLeft = "mod_assets/animations/big_slime/green_slime_turn_left.fbx",
turnRight = "mod_assets/animations/big_slime/green_slime_turn_right.fbx",
attack = "mod_assets/animations/big_slime/green_slime_attack.fbx",
rangedAttack = "mod_assets/animations/big_slime/green_slime_attack.fbx",
attackBack = "mod_assets/animations/big_slime/green_slime_attack_back.fbx",
attackLeft = "mod_assets/animations/big_slime/green_slime_attack_left.fbx",
attackRight = "mod_assets/animations/big_slime/green_slime_attack_right.fbx",
getHitFrontLeft = "mod_assets/animations/big_slime/green_slime_get_hit_front_left.fbx",
getHitFrontRight = "mod_assets/animations/big_slime/green_slime_get_hit_front_right.fbx",
getHitBack = "mod_assets/animations/big_slime/green_slime_get_hit_back.fbx",
getHitLeft = "mod_assets/animations/big_slime/green_slime_get_hit_left.fbx",
getHitRight = "mod_assets/animations/big_slime/green_slime_get_hit_right.fbx",
fall = "mod_assets/animations/big_slime/green_slime_get_hit_front_left.fbx",
},
}Letting the big slime throw small slimes at the party. Try attacking him while he throws tiny slimes at you. First, sleep.