Bad magic effect scale parameters

Post » Wed Sep 23, 2015 12:17 am

I have run into http://i.imgur.com/sRnym1g.png while testing out a script which is meant to simply cast a spell at the player on proximity. It says: "Scale Parameters for Magic Effect Damage Health are bad."

This is the script:

begin md15_scr_curse_deathif ( GetDistance, Player < 256 )	if ( Player->GetSpellEffects, "md15_curse_death" == 1 )		Return	else		Cast, "md15_curse_death", Player	endifendifend

And these are http://i.imgur.com/6pXDQlD.png.

The strange thing is that I have nearly the exact same script with a levitation effect and it works perfectly well.

begin md15_scr_levitate_fieldif ( GetDistance, Player < 512 )	if ( Player->GetSpellEffects, "md15_spell_levitate_touch" )		Return	else		Cast, "md15_spell_levitate_touch", Player	endifendifend

I'm not sure what other factors could be at play here...

User avatar
RAww DInsaww
 
Posts: 3439
Joined: Sun Feb 25, 2007 5:47 pm

Post » Wed Sep 23, 2015 12:24 am

Well, as I was posting this I had a suspicion of what the issue could be. I was using the editormarker for the first script which seems to freak the engine out if you tell a TRULY invisible object (marker-type) to cast a spell. The odd thing though was that I would only get the error a couple of times and then it would operate normally. But instead I changed to a transparent object which seems to have fixed the error completely.

User avatar
Steven Hardman
 
Posts: 3323
Joined: Sun Jun 10, 2007 5:12 pm

Post » Tue Sep 22, 2015 11:30 am

IIRC casting object must have collision
[EDIT]by the way, script would be more efficient this way

begin md15_scr_levitate_fieldif ( Player->GetSpellEffects, "md15_spell_levitate_touch" )	Returnendifif ( GetDistance, Player < 512 )	Cast, "md15_spell_levitate_touch", Playerendifend
User avatar
Emily Shackleton
 
Posts: 3535
Joined: Sun Feb 11, 2007 12:36 am

Post » Tue Sep 22, 2015 9:10 pm

Thanks for the suggestion and input, abot!

I've written about 15 scripts for my ModTown claim and I would probably be better off posting them to be scrutinized prior to release as I tend to just brute force these things. Not much finesse in my scripts.

User avatar
Chris BEvan
 
Posts: 3359
Joined: Mon Jul 02, 2007 4:40 pm


Return to III - Morrowind