SHAD0WC0BRA Posted January 26, 2020 Share Posted January 26, 2020 (edited) Hey there. I'm trying to create a script for a Base Effect which I will then use in an Actor Effect to apply a different Actor Effect. The idea is to have an effect that will wait 8 seconds and then either apply or not apply based on random chance. Here is my script as it is presently (this script is using only the built in GECK functions): scn BarkScorpionParalysisSCRIPTfloat timerbegin ScriptEffectStart if GetRandomPercent > 75 if timer < 8 set timer to timer + GetSecondsPassed else CastImmediateOnSelf BarkScorpionParalysis set timer to 0 endif endifend I have this script attached to a Base Effect. I have set the flags Hostile, Self, Touch, and No Magnitude. On the Actor Effect, I have chosen this Base Effect and set it to zero duration/magnitude/area and to range "Self." Here is some additional information to make sure I haven't messed anything else up. This is a paralysis effect, and I've created a paralysis base effect with the flags Hostile, Recover, Self, Touch, and Target. This base effect is tied an actor effect that you see in the above script called "BarkScorpionParalysis." I have it set to 100 Magnitude, 5 Duration, 0 Area, and range "Touch" (it's the same as another mod with paralysis that I've made, so I figured that would work). Also, does anyone know why bark scorpions seem to poison themselves and die sometimes with my mod? I have all the ranges on the actor effects just like in the vanilla game, and they're definitely inflicting poison on me... Edited January 26, 2020 by SHAD0WC0BRA Link to comment Share on other sites More sharing options...
Mktavish Posted January 27, 2020 Share Posted January 27, 2020 Just for starters ... you can't make a timer work in a 1 frame block.You need to use "ScriptEffectUpdate" for continuous reading. And it looks like you want to have a "No Magnitude" for paralysis ... since it is basically just on/off ? Why scorpions are poisoning themselves ? According to this script ... scn BarkScorpionPoisonEffectSCRIPTfloat timerEffectref myselfbegin ScriptEffectStartset myself to GetSelfif myself == player;ShowWarning "Poisoned by bark scorpion!"float randomTimeset randomTime to 5.0 + 20.0/99.0 * GetRandomPercentset timerEffect to randomTimeShowMessage FixerDizzyMsgendifendbegin ScriptEffectUpdateset myself to GetSelfif myself == playerif timerEffect <= 0ApplyImageSpaceModifier BarkScorpionPoisonISFXset timerEffect to 5.0 + 20/99.0 *GetRandomPercentelseset timerEffect to (timerEffect - GetSecondsPassed)endifendifend It is using a variable "MySelf" to make sure it is only the player.But notice , this effect is just a visual , and does no actual damage.So you may want to split up particular pieces into multiple base effects , and try to keep it simple with what flags they use. Because I think to many flags can confuse it depending on what your doing ? IDK really , but dealing with effects can get confusing pretty fast imo ... hence I tend to try to keep it simple. Link to comment Share on other sites More sharing options...
Recommended Posts