Bluclawstoryteller Posted January 7, 2010 Share Posted January 7, 2010 I am trying to do a bit of scripting for my "Vampire's Assistant" (A scripted knife) What I want it to do is add a blood pack to anyone I kill. I am working out the scripting myself, (Trying to learn) but one thing that confuses me is what would be the best blocktype? On Equip sounds good, but glitchy. Link to comment Share on other sites More sharing options...
Bluclawstoryteller Posted January 7, 2010 Author Share Posted January 7, 2010 And... ummm. >> How can you tell if the scripted object killed someone? Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted January 7, 2010 Share Posted January 7, 2010 I would try OnDeath and then make sure your script checks that the player IsKiller. Link to comment Share on other sites More sharing options...
Bluclawstoryteller Posted January 8, 2010 Author Share Posted January 8, 2010 Doesn't OnDeath only work when a SPECIFIC person is killed? I am not great at modding, but when I looked it up, I am almost positive thats what it said. Link to comment Share on other sites More sharing options...
pkleiss Posted January 9, 2010 Share Posted January 9, 2010 Yea, an OnDeath block can only be used on actors, not a scripted weapon as the weapon doesn't die. What you're asking for is a little trickey for me to come up with on fly - without coding and testing myself. A simple solution would be to add an Object Effect to the weapon that uses a script effect. The script could use two commands: Begin ScriptEffectStart If GetItemCount Bloodpack = 0 Additem Bloodpack 1 Endif End This will add one blood pack to the targe't inventory upon the first sucessful hit with the weapon and no more. It does not do it upon killing the creature with the weapon though. Without running a script on the actor (Target) themselves, I'm not sure how to go about this. And I doubt you want to add a script to every actor in the game. Link to comment Share on other sites More sharing options...
Recommended Posts