stalkersoldiers Posted September 12, 2008 Share Posted September 12, 2008 trying to ake a script for a sword that has a random chance of killing someone. the higher your infamy the better the chance. but it won't work. i know mehrunes razor does the same thing but with luck so i tried to use that as a base but nothing. Any suggestions/tips/example scripts/Anything? Link to comment Share on other sites More sharing options...
LoginToDownload Posted September 12, 2008 Share Posted September 12, 2008 I wouldn't know Mehrunes Razor's script, but it shouldn't be too hard... What kind of percent-chance are you looking for, how much do you already know about scripting, and how did you attempt to copy the razor-script? Link to comment Share on other sites More sharing options...
stalkersoldiers Posted September 12, 2008 Author Share Posted September 12, 2008 ok i'm half-way decent with scripting. what i want to do is have the players infamy, ex:32, divide it by 2 and that be the percent chance. How might, if possible, this work? i basically looked at the script for Mehrunes Razor and saw the basic form, what they floated, short, etc. Link to comment Share on other sites More sharing options...
LoginToDownload Posted September 13, 2008 Share Posted September 13, 2008 In that case, the script would go like...scn MyWeaponEnchantScript Begin ScriptEffectStart ;ScriptEffectStart blocks run when the effect in question is first added. if (GetRandomPercent < (GetPCInfamy / 2) && IsActor && IsEssential == 0) ;If a random number between 0 and 99 is less than the player's infamy divided by two... ;...the victim is, in fact, an actor, and they're not essential... PlaySound SPLDestructionHit kill endif endBe sure to set it to a Magic Effect script via the drop-down box above the text-editor, then attach it to a Script Effect enchantment and attach that to the weapon by the normal means. Just to note, this isn't based off the Mehrunes Razor script because I don't have Mehrunes Razor. I can't see a reason why it wouldn't work, though. Link to comment Share on other sites More sharing options...
stalkersoldiers Posted September 13, 2008 Author Share Posted September 13, 2008 holy crap! I was just asking for some tips but this is awsome!!! thanks alot, i'm going to test it out right now. EDIT: ok i tried it and it works perfectly. I'll put your name in the credits when it's done. Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.