6TemplaR9 Posted February 10, 2012 Share Posted February 10, 2012 You could just make a GetRandomPercent NONE == x condition in the Magic Effect window. Link to comment Share on other sites More sharing options...
ghosu Posted February 10, 2012 Author Share Posted February 10, 2012 (edited) Doh okay i really have to watch some scripting tutorials...thx for your feedback. It's a pitty, i wanted to finish this damn hammer before i go over to CK and scripting. Edited February 10, 2012 by ghosu Link to comment Share on other sites More sharing options...
GisleAune Posted February 10, 2012 Share Posted February 10, 2012 (edited) You could just make a GetRandomPercent NONE == x condition in the Magic Effect window.This worked! Do as he said and add a GetRandomPercent condistion with the <= operator and value 15.0000 and it'll do just as you want it to do. Do this on a copied shock damage for the random shock magical efffect. Then copy the shock damage enchantment and swap the effect with your effect. Search for enchantment and magical effect on the wiki for more info. @imperistan, a property is a kind of parameter to make the script reusable. By double clicking the script in the list of scripts added to the magical effect you can set the value of properties. But the script in my post is useless anyways. Edited February 10, 2012 by GisleAune Link to comment Share on other sites More sharing options...
skizophrenic Posted February 10, 2012 Share Posted February 10, 2012 (edited) I don't understand the problem, the script I quoted should be your answer: If (utility.RandomInt() <= PERCENT CHANCE TO ACTIVATE) If Game.GetPlayer().GetItemCount(YOURWEAPON) >=1 WEAPON EFFECT Else FAIL EFFECTEndIfEndIf Edit: Someone else found a better solution, but this is still an option if the effect has more conditions (the razor checked if the target was immune) Edited February 10, 2012 by skizophrenic Link to comment Share on other sites More sharing options...
GisleAune Posted February 10, 2012 Share Posted February 10, 2012 I don't understand the problem, the script I quoted should be your answer: (code snippet) Edit: Someone else found a better solution, but this is still an option if the effect has more conditions (the razor checked if the target was immune)There is nothing to replace WEAPON EFFECT with, the only way is to dispel the effect, which appearently didin't work. This works just as intended. Link to comment Share on other sites More sharing options...
ghosu Posted February 10, 2012 Author Share Posted February 10, 2012 Ah this random script line is fine, that works...thx a lot guys :) Link to comment Share on other sites More sharing options...
ghosu Posted February 10, 2012 Author Share Posted February 10, 2012 (edited) Just one more thing i would like to add to this weapon without scripting knowledge (yet): My enchantment works now, 5% chance to paralzye for 1 second, 10% chance for knockback and minor lightening dmg with eah hit...i would like to activate a sound each the the knockback ticks (there is a thunder sound ingame that would fit). Any ideas and if yes maybe a simple explanation? This looks like fun...i will check out tutorials after the release of this hammer so i can add better stuff for my upcoming weapons :D Edited February 10, 2012 by ghosu Link to comment Share on other sites More sharing options...
imperistan Posted February 10, 2012 Share Posted February 10, 2012 I figured out how to add the thundering sound to the effect. In the knockback effect itself (I don't suggest overwriting an already existing effect, just as a precaution) change its on-hit sound to the sound you want to play. It does indeed sound quite awesome. Shame I didn't think of it lol. Link to comment Share on other sites More sharing options...
6TemplaR9 Posted February 10, 2012 Share Posted February 10, 2012 (edited) Make 3 new magic effects first for the lightning enchantment, the second for the knockback set up the getrandompercent condition under the conditions subwindow you can see the effect possibilities and the third is for the paralyse, just give the enchancements to your weapon. EDIT:I've got ninja'd... Edited February 10, 2012 by 6TemplaR9 Link to comment Share on other sites More sharing options...
ghosu Posted February 10, 2012 Author Share Posted February 10, 2012 thx Link to comment Share on other sites More sharing options...
Recommended Posts