[Monster] Bring on the snails! [now with turbo-mode]
Re: [WIP] Bring on the snails! *stuck*
The snails are doing no damage.
Wait, have the animations been defined? Maybe they need to be defined like the materials and sounds?
Wait, have the animations been defined? Maybe they need to be defined like the materials and sounds?
Re: [Monster] Bring on the snails! *working*
updated first post.
I have still no clue what goes on with the onBeginAction-stuff.. seems like the setAnimation stuff triggers the damage-thingy...
but OMG WE HAVE SNAILS!
I have still no clue what goes on with the onBeginAction-stuff.. seems like the setAnimation stuff triggers the damage-thingy...
but OMG WE HAVE SNAILS!
Links to my YouTube playlist of "tutorials" and to my forum thread.
Re: [Monster] Bring on the snails! *working*
Gratz prozail ^^ What about the king snail now ? :p
Re: [WIP] Bring on the snails! *stuck*
In retrospect i think this is what solved it.. only it didn't get reloaded until i restarted the editor.Grimfan wrote:Wait, have the animations been defined? Maybe they need to be defined like the materials and sounds?
Links to my YouTube playlist of "tutorials" and to my forum thread.
- Rougecorne
- Posts: 34
- Joined: Wed Oct 29, 2014 1:52 am
Re: [Monster] Bring on the snails! *working*
Mmm, thank you, it work !
Buuuuut, where is the sound for "snail_walk" ?
Buuuuut, where is the sound for "snail_walk" ?
Re: [Monster] Bring on the snails! *working*
hmm. my snails have sounds... the definition is in there and seem to work, atleast here. so doublecheck your copy-pasting
Links to my YouTube playlist of "tutorials" and to my forum thread.
Re: [Monster] Bring on the snails! *working*
-- Updated Script with working turn attacks, and immunity to cold --
Decided to try and import the Ice Lizard from Grimrock one, but I haven't figured out how to get his turn attacks working. I'm not exactly sure how to set up the tables for the animations. If someone knows how or wants to play around with it and figures it out then that'd be much appreciated. And for those that just want to get the Ice Lizard, the code is below, and I *have* updated it.
This goes in monsters.lua: This script is the one that needs the table of animations, near the bottom
This goes in materials.lua:
This goes in sound.lua:
Decided to try and import the Ice Lizard from Grimrock one, but I haven't figured out how to get his turn attacks working. I'm not exactly sure how to set up the tables for the animations. If someone knows how or wants to play around with it and figures it out then that'd be much appreciated. And for those that just want to get the Ice Lizard, the code is below, and I *have* updated it.
This goes in monsters.lua: This script is the one that needs the table of animations, near the bottom
Code: Select all
defineAnimationEvent{
animation = "assets/animations/monsters/ice_lizard/ice_lizard_attack.fbx",
event = "attack",
frame = 10,
}
defineAnimationEvent{
animation = "assets/animations/monsters/ice_lizard/ice_lizard_attack_left.fbx",
event = "attack",
frame = 10,
}
defineAnimationEvent{
animation = "assets/animations/monsters/ice_lizard/ice_lizard_attack_right.fbx",
event = "attack",
frame = 10,
}
defineAnimationEvent{
animation = "assets/animations/monsters/ice_lizard/ice_lizard_walk.fbx",
event = "footstep",
frame = 10,
}
defineAnimationEvent{
animation = "assets/animations/monsters/ice_lizard/ice_lizard_walk.fbx",
event = "footstep",
frame = 21,
}
defineAnimationEvent{
animation = "assets/animations/monsters/ice_lizard/ice_lizard_turn_left.fbx",
event = "footstep",
frame = 10,
}
defineAnimationEvent{
animation = "assets/animations/monsters/ice_lizard/ice_lizard_turn_right.fbx",
event = "footstep",
frame = 10,
}
defineObject{
name = "ice_lizard",
baseObject = "base_monster",
components = {
{
class = "Model",
model = "assets/models/monsters/ice_lizard.fbx",
storeSourceData = true,
},
{
class = "Animation",
name = "animation",
currentLevelOnly = true,
animations = {
idle = "assets/animations/monsters/ice_lizard/ice_lizard_idle.fbx",
moveForward = "assets/animations/monsters/ice_lizard/ice_lizard_walk.fbx",
turnLeft = "assets/animations/monsters/ice_lizard/ice_lizard_turn_left.fbx",
turnRight = "assets/animations/monsters/ice_lizard/ice_lizard_turn_right.fbx",
attack = "assets/animations/monsters/ice_lizard/ice_lizard_attack.fbx",
turnAttackLeft = "assets/animations/monsters/ice_lizard/ice_lizard_attack_left.fbx",
turnAttackRight = "assets/animations/monsters/ice_lizard/ice_lizard_attack_right.fbx",
getHitFrontLeft = "assets/animations/monsters/ice_lizard/ice_lizard_get_hit_front_left.fbx",
getHitFrontRight = "assets/animations/monsters/ice_lizard/ice_lizard_get_hit_front_right.fbx",
getHitBack = "assets/animations/monsters/ice_lizard/ice_lizard_get_hit_back.fbx",
getHitLeft = "assets/animations/monsters/ice_lizard/ice_lizard_get_hit_left.fbx",
getHitRight = "assets/animations/monsters/ice_lizard/ice_lizard_get_hit_right.fbx",
fall = "assets/animations/monsters/ice_lizard/ice_lizard_get_hit_front_left.fbx",
},
},
{
class = "Monster",
meshName = "ice_lizard_mesh",
level=1,
health = 650,
evasion = 10,
exp = 675,
lootDrop = { 70, "ice_lizard_steak" },
traits = { "animal" },
immunities = { "blinded", "frozen" },
resistances = { cold="immune", fire="weak"},
hitEffect = "hit_blood",
capsuleHeight = 0.4,
capsuleRadius = 0.5,
footstepSound = "ice_lizard_footstep",
hitSound = "ice_lizard_hit",
dieSound = "ice_lizard_die",
--onPerformAction = function(self,a,b,c)
--print(self.go.id,a,b,c)
--end
},
{
class = "IceLizardBrain",
name = "brain",
},
{
class = "MonsterMove",
name = "move",
sound = "ice_lizard_walk",
resetBasicAttack = false,
turnDir = 0,
cooldown = 1,
},
{
class = "MonsterTurn",
name = "turn",
sound = "ice_lizard_walk",
cooldown = 1,
},
{
class = "MonsterAttack",
name = "basicAttack",
sound = "ice_lizard_attack",
cooldown = 1,
attackPower = 40,
animationSpeed = 1,
animation = "attack",
},
{
class = "MonsterAttack",
name = "turnAttack",
sound = "ice_lizard_attack",
cooldown = 1,
attackPower = 40,
animationSpeed = 1,
animations = {"attack_right", "attack_left"},
turnToAttackDirection = true,
},
}
}
Code: Select all
defineMaterial{
name = "ice_lizard",
diffuseMap = "assets/textures/monsters/ice_lizard_dif.tga",
specularMap = "assets/textures/monsters/ice_lizard_spec.tga",
normalMap = "assets/textures/monsters/ice_lizard_normal.tga",
doubleSided = false,
lighting = true,
alphaTest = false,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 65,
depthBias = 0,
}
Code: Select all
defineSound{
name = "ice_lizard_attack",
filename = "assets/samples/monsters/ice_lizard_attack_01.wav",
loop = false,
volume = 1,
minDistance = 1,
maxDistance = 10,
}
defineSound{
name = "ice_lizard_walk",
filename = "assets/samples/monsters/ice_lizard_walk_01.wav",
loop = false,
volume = 0.5,
minDistance = 1,
maxDistance = 4,
}
defineSound{
name = "ice_lizard_footstep",
filename = "assets/samples/monsters/ice_lizard_footstep_01.wav",
loop = false,
volume = 0.4,
minDistance = 1,
maxDistance = 6,
}
defineSound{
name = "ice_lizard_hit",
filename = {
"assets/samples/weapons/hit_bone_01.wav",
"assets/samples/weapons/hit_bone_02.wav",
"assets/samples/weapons/hit_flesh_01.wav",
"assets/samples/monsters/ice_lizard_hit_01.wav",
"assets/samples/monsters/ice_lizard_hit_02.wav",
},
loop = false,
volume = 1,
minDistance = 1,
maxDistance = 10,
}
defineSound{
name = "ice_lizard_die",
filename = "assets/samples/monsters/ice_lizard_die_01.wav",
loop = false,
volume = 1,
minDistance = 1,
maxDistance = 10,
}
Last edited by sps999 on Tue Nov 04, 2014 5:57 am, edited 5 times in total.
- Rougecorne
- Posts: 34
- Joined: Wed Oct 29, 2014 1:52 am
Re: [Monster] Bring on the snails! *working*
Ok i say nothing, it's work ! ^^
Re: [Monster] Bring on the snails! *working*
Yup those are supposed to be "attack_left" and "attack_right". An THAT is one of the things you have to totally restart the editor once those have been read, to get them to update.sps999 wrote:--HERE is where the table is (Animations might be "attack_right" instead of "turnAttackRight")
Tested the lizard. Works just fine here aswell
also.. a neat debugging trick put this in the monstercomponent to see all actions hes doing (turn, move etc..)
Code: Select all
onPerformAction = function(self,a,b,c)
print(self.go.id,a,b,c)
end
Links to my YouTube playlist of "tutorials" and to my forum thread.