Jump to content

% Chance to activate enchantment (weapon)


ghosu

Recommended Posts

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 by GisleAune
Link to comment
Share on other sites

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 EFFECT

EndIf

EndIf

 

 

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 by skizophrenic
Link to comment
Share on other sites

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

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 by ghosu
Link to comment
Share on other sites

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

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 by 6TemplaR9
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...