Skeleton creature not dealing dmg - SOLVED

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Skeleton creature not dealing dmg - SOLVED

Post by Drakkan »

Pls somebody help, I dont know why this skeleton is not dealing any damage (no matter how I set attack). It is skeleton from log1, only name was modified :/
perhaps it is because of some animations issues ? not sure...

Code: Select all

defineObject{
	name = "skeleton_warrior_spawned",
	baseObject = "base_monster",
	components = {
		{
			class = "Model",
			model = "assets/models/monsters/skeleton_warrior.fbx",
			storeSourceData = true,
		},
		{
			class = "Animation",
			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",
				attackBackRow = "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",
			},
			currentLevelOnly = true,
		},
		{
			class = "Monster",
			meshName = "skeleton_warrior_mesh",
			footstepSound = "skeleton_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,
			--lootDrop = { 100, "legionary_spear", 100, "legionary_shield" },
		},
		{
			class = "MeleeBrain",
			name = "brain",
			sight = 4,
		},
		{
			class = "MonsterMove",
			name = "move",
			sound = "skeleton_walk",
			cooldown = 2,
		},
		{
			class = "MonsterTurn",
			name = "turn",
			sound = "skeleton_walk",
		},
		{
			class = "MonsterAttack",
			name = "basicAttack",
			attackPower = 20,
			accuracy = 10,
			cooldown = 3,
			sound = "skeleton_attack",
			onBeginAction = function(self)
				-- use backrow attack animation
				self:setAnimation(iff(self.go.monster:isInBackRow(), "attackBackRow", "attack"))
			end,
		},
	},
}
Last edited by Drakkan on Wed Dec 24, 2014 12:32 am, edited 1 time in total.
Breath from the unpromising waters.
Eye of the Atlantis
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Skeleton creature not dealing dmg

Post by minmay »

Can you please post the animation event for the attack?
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Skeleton creature not dealing dmg

Post by Drakkan »

minmay wrote:Can you please post the animation event for the attack?
I do not have it as it refere to some default asset folder. I suppose maybe use old one fro Log1 and convert it to Log2 could work ? (if problem is really in animation)
Breath from the unpromising waters.
Eye of the Atlantis
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Skeleton creature not dealing dmg

Post by minmay »

Not the animation, the animation event definition. As in, one of these:

Code: Select all

defineAnimationEvent{
	animation = "assets/animations/monsters/skeleton_knight_trooper/skeleton_knight_trooper_attack.fbx",
	event = "attack",
	frame = 12,
}
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Skeleton creature not dealing dmg - SOLVED

Post by Drakkan »

minmay wrote:Not the animation, the animation event definition. As in, one of these:

Code: Select all

defineAnimationEvent{
	animation = "assets/animations/monsters/skeleton_knight_trooper/skeleton_knight_trooper_attack.fbx",
	event = "attack",
	frame = 12,
}
and NOW the mystery is resolved - I just forget to copy it :d sorry and thanks.
Breath from the unpromising waters.
Eye of the Atlantis
Post Reply