Jump to content

Random Effect Weapon


Phrozin

Recommended Posts

Well I guess first thing you need to figure out all the effects you want to use (Actor Effects)

Might want to just make all your own even if you duplicate them exactly ... but you could call to the vanilla ones if you don't have to adjust them. And you may have to replicate some base effects the actor effects use if you need to adjust stuff on that window.

 

But once you have all your actor effects lined out ... 10 of them for example.

 

Then make a base effect that is archetype "Script" and attach a script for the assoc item (effect type script :example below)

 

On the flags ... Set Hostile and Recover ... but not sure you'll need these 2.

Then also flag it ... self/touch/target ... no duration/no magnitude/no area .

 

Here's an example script (Effect Type)

 

SCN MyRandomEffectScript
Short DieRoll
Begin ScriptEffectStart
Set DieRoll to GetRandomPercent
If DieRoll < 11
CIOS MyActorEffect01
If DieRoll > 10 && DieRoll < 21
CIOS MyActorEffect02
If DieRoll > 20 && DieRoll < 31
CIOS MyActorEffect03
; Etc ... for rest of iteration
endif
endif
endif
END
~~~~~~~~~~~~~~~~~~~~~~~~~
CIOS is the short version for "CastImmediateOnSelf" in case your wondering.
So obviously to save this script you need to have the form-id's in place for the Actor Effects .
And all of those Actor Effects must have a self range and a non zero duration to work.
So now you make a new Object effect , then attach the base effect that runs this script.
And you just attach that Object Effect to your weapon.
I'm pretty sure that will work ... but if you get stuck or one of the actor effects doesn't seem to apply let me know.
Link to comment
Share on other sites

We both came up with a similar way, except I made a global variable (VoodooRandomNum) and set the effects conditions to the number range.

SCN VoodooRandomSCRIPT

BEGIN GameMode
	float timer
	int Vpete
	set Vpete to 1

	Label Vpete
	if timer < 2
		set timer to timer + GetSecondsPassed
		set VoodooRandomNum to GetRandomPercent
	else
		set timer to 0
		goto Vpete
	endif
END

That did help work out the couple of problems I was having, though. Now to add additional effects and model and texture a voodoo doll!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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