iansaltman Posted February 10, 2012 Share Posted February 10, 2012 I attached the script MineOreVein (or whatever it is) to an absorb health spell, obviously so you could magically extract the ore rather than using the pickaxe. I set it as a concentrated cast as well as an aimed targeting. Any ideas on why it wouldn't work when I cast it on a vein in-game? Link to comment Share on other sites More sharing options...
McclaudEagle Posted February 10, 2012 Share Posted February 10, 2012 Maybe it has something to do with the animations shown when mining, or perhaps the vein object isn't registering that it's being hit, thus won't do anything? Link to comment Share on other sites More sharing options...
iansaltman Posted February 10, 2012 Author Share Posted February 10, 2012 Maybe it has something to do with the animations shown when mining, or perhaps the vein object isn't registering that it's being hit, thus won't do anything? I'm going to try a different type of casting I suppose, a projectile seems like it would register better. It's too late where I live though, it'll have to wait.1 Link to comment Share on other sites More sharing options...
PaladinRider Posted February 10, 2012 Share Posted February 10, 2012 (edited) Could you post up the script? It will probably need a minor modification. It would also probably be a good idea to make it a completely new script and then you can edit it without modifying the original. As well, if someone has a mod that changes the mining script, it'll potentially prevent your mod from working properly. Edit: I don't have the CK handy but I'm guessing it's an onhit event. You're going to want to make sure the akProjectile is not set to false. This is for melee. This is what I'm thinking: Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) If ( akAggressor == Game().GetPlayer() ) && ( akSource == MySpellProperty) script block to collect mine ore endif Debug.Trace("We were hit by " + akAggressor) EndEvent This is obviously untested but may be a good start Edited February 10, 2012 by PaladinRider Link to comment Share on other sites More sharing options...
iansaltman Posted February 10, 2012 Author Share Posted February 10, 2012 Could you post up the script? It will probably need a minor modification. It would also probably be a good idea to make it a completely new script and then you can edit it without modifying the original. As well, if someone has a mod that changes the mining script, it'll potentially prevent your mod from working properly. Edit: I don't have the CK handy but I'm guessing it's an onhit event. You're going to want to make sure the akProjectile is not set to false. This is for melee. This is what I'm thinking: Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) If ( akAggressor == Game().GetPlayer() ) && ( akSource == MySpellProperty) script block to collect mine ore endif Debug.Trace("We were hit by " + akAggressor) EndEvent This is obviously untested but may be a good start This, it's making sense! Help much appreciated, it is a good start! Link to comment Share on other sites More sharing options...
Recommended Posts