I have recently discovered a error in my ooze on damage script. I have it, so there is a chance to destroy a player's melee weapon on hit. Currently it checks if it is a ranged weapon and nothing happens.
I have recently discovered that when hit with a warlock's eldritch blast that their weapon can be destroyed when they are nowhere near the ooze.
searching through functions and include scripts I have been unable to find a way to distinguish weapon damage from magical damage with an on damage script. Does anyone know of a way?
As a work around I am considering changing the oozes' cast spell at or physical attack scripts and have it set a local int using the name as the variable name and having the on damage check that variable before it tries to destroy the item.
On damage Script: ID if damage from spell
Débuté par
Shaughn78
, janv. 14 2011 11:30
#1
Posté 14 janvier 2011 - 11:30
#2
Posté 14 janvier 2011 - 11:42
Hmmm, I'm not sure, but my inclination would be that it might be better to have the weapon destruction happen as a custom OnHit Cast Spell property on the ooze's skin object. Then it will trigger only when hit - though I don't think you can check for damage in this instance.
#3
Posté 15 janvier 2011 - 01:52
That is still poses the same problem as to wether the damage is from a spell or a melee weapon.
With the above work around i would need to remove or reset the int at the end of the round.
Another solution, would be to check the distance between the ooze and damager. While this could still cause issues with spell damage it would decrease the probability.
With the above work around i would need to remove or reset the int at the end of the round.
Another solution, would be to check the distance between the ooze and damager. While this could still cause issues with spell damage it would decrease the probability.
#4
Posté 15 janvier 2011 - 12:24
The OnHit Cast Spell property only triggers when the creature is *hit*, not damaged. So, it oughtn't even fire from a spell. You can also find the item used to hit it with, so you can discount ranged attacks. You might have an issue with, say, creatures with DR, where they might be hit but not damaged - in this case, you might want the script not to trigger, but it would. However, if you're making an ooze this probably won't be a problem, and even if it is I think it's a smaller issue than the one you currently have.
#5
Posté 15 janvier 2011 - 01:59
That did the trick. Added the on hit cast unique spell and now it is working.
They are spliting on slashing damage and destroying melee weapons on physical attacks only. Weapons are safe when casting spells.
Thanks Fred.
They are spliting on slashing damage and destroying melee weapons on physical attacks only. Weapons are safe when casting spells.
Thanks Fred.
#6
Posté 15 janvier 2011 - 05:36
No problem. All kinds of weapon-destruction are good in my book.
#7
Posté 08 juin 2011 - 03:04
Can you share script?
#8
Posté 08 juin 2011 - 07:42
I really like it when standard scripting solutions fix a runtime bug. Nice one Fred.
#9
Posté 08 juin 2011 - 09:18
There is on physical hit box on creature field script.





Retour en haut







