Jump to content

Effect Script Assistance Requested


VanScythe

Recommended Posts

I am in need of some assistance with a script application. The script works just as it's designed to, but my problem is getting it to work as it's needed to. It's a disintegration script applied to a weapon. The weapon happens to be a minigun. I need it to disintegrate everything it kills (just like the alien blaster). It does it sometimes, but not every time as it's needed.

 

The Crit % Mult is set to 100, and I have tried making it activate on death, as well as every attack. Neither has proved effective. Here's the script:

Float Timer
Short DoOnce
Short IsPile

Begin ScriptEffectStart
    SetCriticalStage DisintegrateStart
    PMS AlienCritGlowFXShader
    PMS effectAlienDisintegration
    Set Timer to 1.8
    Set DoOnce to 0
    Set IsPile to 0
End

Begin ScriptEffectUpdate
    If DoOnce == 0
        If IsPile == 0
            If Timer <= 0.5
                Set IsPile to 1
            EndIf
        EndIf

        If Timer <= 0
            SetCriticalStage DisintegrateEnd
            SMS AlienCritGlowFXShader
            SMS effectAlienDisintegration
            Set DoOnce to 1
        EndIf
        Set Timer to (Timer - GetSecondsPassed)
    EndIf
End

Any assistance is appreciated, and will of course be credited.

Link to comment
Share on other sites

I've found a temporary fix for this, and it's working just fine. Though I would still like some assistance with this particular script for what I need it for, for future use.

Link to comment
Share on other sites

I don't know if this is the problem, but GetSecondsPassed doesn't always work correctly when called within an effect script. Using ScriptEffectElapsedSeconds is more reliable in that context.

I'll try that out. Thank you.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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