any way to directly detect if player is hit by blob?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

any way to directly detect if player is hit by blob?

Post by Komag »

I can't make onDamage or onProjectileHit give me any results, presumably because blob isn't a projectile and does no damage. Is there any other way to directly detect if the party is hit by a blob?

If not then all I can think of is to set up accurate timers to know that the blob failed to hit the receptor on time, but I'm going to set up a lot of them so I'd rather have a direct approach is possible
Finished Dungeons - complete mods to play
User avatar
Diarmuid
Posts: 807
Joined: Thu Nov 22, 2012 6:59 am
Location: Montreal, Canada
Contact:

Re: any way to directly detect if player is hit by blob?

Post by Diarmuid »

That's exactly what I'm doing with my spells framework... setting up a ton of timers :). And one of the goals of the project was to handle such cases because it was impossible in native Grimrock.

What you ask is super easy in exsp:

Code: Select all

exsp.addSpellHooks("blob",{
	onPartyHit = function(sId)
		[do whatever you want, sId being the id of the blob entity]
	end
	}
)
But there's a lot going on behind the scenes to make it happen... ;)

PS: By the way, I've found a few bugs in 1.3.3, working on a more stable release that will also integrate some of Grimwold's work, new version should be up soon, don't download it right now, might not be 100% stable.
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: any way to directly detect if player is hit by blob?

Post by Komag »

From: hyteria
To: Komag
dunno if this can help but if your problem is that blob isn't a projectile, and didn't make damage, why you don't custom a spell like blob but who did damage? :p

---------

it's a good idea!

(I'm not ready to do exsp yet, trying to keep things simple for this project, but thanks, good to know it's available!)
Finished Dungeons - complete mods to play
hyteria
Posts: 266
Joined: Sat Dec 29, 2012 8:22 pm

Re: any way to directly detect if player is hit by blob?

Post by hyteria »

you knonw that i m unskilled on code but if can help with some logic mind hehehe
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: any way to directly detect if player is hit by blob?

Post by Komag »

I've never messed with custom spells before - I can't find any original spells! I of course have the asset pack, but the spell.lua is full of defineObject, no defineSpell anywhere. Where are they?
Finished Dungeons - complete mods to play
hyteria
Posts: 266
Joined: Sat Dec 29, 2012 8:22 pm

Re: any way to directly detect if player is hit by blob?

Post by hyteria »

i think it s a function in a game script
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: any way to directly detect if player is hit by blob?

Post by Neikun »

Oh I know this... Where did I see them when I was doing my gardians?

EDIT: They're in objects.lua
Just ctrl+f and find the one you're looking for n.n
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: any way to directly detect if player is hit by blob?

Post by Komag »

there are no spells in my asset pack objects.lua
Finished Dungeons - complete mods to play
hyteria
Posts: 266
Joined: Sat Dec 29, 2012 8:22 pm

Re: any way to directly detect if player is hit by blob?

Post by hyteria »

check grimworld tread , he worked on some custom spell , maybee this help , i think you had to add it into game in a script
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: any way to directly detect if player is hit by blob?

Post by Neikun »

Weird... There are in mine. Do you have the latest version?

Anyway, in case you still can't find them:
SpoilerShow

Code: Select all

defineObject{
	name = "fireburst",
	class = "BurstSpell",
	screenEffect = "fireball_screen",
	particleSystem = "fireburst",
	lightColor = vec(0.75, 0.4, 0.25),
	lightBrightness = 40,
	lightRange = 4,
	sound = "fireburst",
	attackPower = 20,
	damageType = "fire",
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "shockburst",
	class = "BurstSpell",
	particleSystem = "shockburst",
	lightColor = vec(0.25, 0.5, 1),
	lightBrightness = 40,
	lightRange = 4,
	sound = "shockburst",
	attackPower = 27,
	damageType = "shock",
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "frostburst",
	class = "BurstSpell",
	particleSystem = "frostburst",
	lightColor = vec(0.25, 0.5, 1),
	lightBrightness = 40,
	lightRange = 4,
	sound = "frostburst",
	attackPower = 20,
	damageType = "cold",
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "fireball",
	class = "ProjectileSpell",
	particleSystem = "fireball",
	hitParticleEffect = "fireball_hit",
	lightColor = vec(1, 0.5, 0.25),
	lightBrightness = 15,
	lightRange = 7,
	lightHitBrightness = 40,
	lightHitRange = 10,
	castShadow = true,
	launchSound = "fireball_launch",
	projectileSound = "fireball",
	hitSound = "fireball_hit",
	screenEffect = "fireball_screen",
	projectileSpeed = 7.5,
	attackPower = 30,
	damageType = "fire",
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "fireball_greater",
	class = "ProjectileSpell",
	particleSystem = "fireball_greater",
	hitParticleEffect = "fireball_hit_greater",
	lightColor = vec(1, 0.5, 0.25),
	lightBrightness = 15,
	lightRange = 7,
	lightHitBrightness = 40,
	lightHitRange = 10,
	castShadow = true,
	launchSound = "fireball_launch",
	projectileSound = "fireball",
	hitSound = "fireball_hit",
	screenEffect = "fireball_screen",
	projectileSpeed = 7.5,
	attackPower = 60,
	damageType = "fire",
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "poison_bolt",
	class = "ProjectileSpell",
	particleSystem = "poison_bolt",
	hitParticleEffect = "poison_bolt_hit",
	lightColor = vec(0.25, 0.6, 0.2),
	lightBrightness = 4,
	lightRange = 4,
	lightHitBrightness = 4,
	lightHitRange = 5,
	launchSound = "poison_bolt_launch",
	projectileSound = "poison_bolt",
	hitSound = "poison_bolt_hit",
	screenEffect = "poison_bolt_screen",
	projectileSpeed = 7.5,
	attackPower = 20,
	damageType = "poison",
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "poison_bolt_greater",
	class = "ProjectileSpell",
	particleSystem = "poison_bolt",
	hitParticleEffect = "poison_bolt_hit",
	lightColor = vec(0.25, 0.6, 0.2),
	lightBrightness = 4,
	lightRange = 4,
	lightHitBrightness = 4,
	lightHitRange = 5,
	launchSound = "poison_bolt_launch",
	projectileSound = "poison_bolt",
	hitSound = "poison_bolt_hit",
	screenEffect = "poison_bolt_screen",
	projectileSpeed = 7.5,
	attackPower = 35,
	damageType = "poison",
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "frostbolt",
	class = "ProjectileSpell",
	particleSystem = "frostbolt",
	hitParticleEffect = "frostbolt_hit",
	lightColor = vec(0.25, 0.5, 1),
	lightBrightness = 15,
	lightRange = 7,
	lightHitBrightness = 40,
	lightHitRange = 10,
	launchSound = "frostbolt_launch",
	projectileSound = "frostbolt",
	hitSound = "frostbolt_hit",
	projectileSpeed = 7.5,
	attackPower = 10,
	damageType = "cold",
	freezeChance = 50,
	freezeDuration = 4,
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "improved_frostbolt",
	class = "ProjectileSpell",
	particleSystem = "frostbolt",
	hitParticleEffect = "frostbolt_hit",
	lightColor = vec(0.25, 0.5, 1),
	lightBrightness = 15,
	lightRange = 7,
	lightHitBrightness = 40,
	lightHitRange = 10,
	launchSound = "frostbolt_launch",
	projectileSound = "frostbolt",
	hitSound = "frostbolt_hit",
	projectileSpeed = 7.5,
	attackPower = 15,
	damageType = "cold",
	freezeChance = 50,
	freezeDuration = 7,
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "ice_shards",
	class = "IceShards",
	attackPower = 20,
	chainCounter = 4,
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "lightning_bolt",
	class = "ProjectileSpell",
	particleSystem = "lightning_bolt",
	hitParticleEffect = "lightning_bolt_hit",
	lightColor = vec(0.25, 0.5, 1),
	lightBrightness = 15,
	lightRange = 7,
	lightHitBrightness = 40,
	lightHitRange = 10,
	castShadow = true,
	launchSound = "lightning_bolt_launch",
	projectileSound = "lightning_bolt",
	hitSound = "lightning_bolt_hit_small",
	projectileSpeed = 10,
	attackPower = 35,
	damageType = "shock",
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "lightning_bolt_greater",
	class = "ProjectileSpell",
	particleSystem = "lightning_bolt_greater",
	hitParticleEffect = "lightning_bolt_hit_greater",
	lightColor = vec(0.25, 0.5, 1),
	lightBrightness = 15,
	lightRange = 7,
	lightHitBrightness = 40,
	lightHitRange = 10,
	castShadow = true,
	launchSound = "lightning_bolt_launch",
	projectileSound = "lightning_bolt",
	hitSound = "lightning_bolt_hit",
	projectileSpeed = 10,
	attackPower = 47,
	damageType = "shock",
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "powerbolt",
	class = "ProjectileSpell",
	particleSystem = "lightning_bolt",
	hitParticleEffect = "lightning_bolt_hit",
	lightColor = vec(0.25, 0.5, 1),
	lightBrightness = 15,
	lightRange = 7,
	lightHitBrightness = 40,
	lightHitRange = 10,
	castShadow = true,
	launchSound = "lightning_bolt_launch",
	projectileSound = "lightning_bolt",
	hitSound = "lightning_bolt_hit",
	projectileSpeed = 10,
	attackPower = 35,
	damageType = "shock",
	--cameraShake = true,
	tags = { "spell" },
}

defineObject{
	name = "poison_cloud",
	class = "PoisonCloud",
	attackPower = 5,
	tags = { "spell" },
}

defineObject{
	name = "blob",
	class = "Blob",
	tags = { "spell" },
}
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
Post Reply