Jump to content
⚠ Known Issue: Media on User Profiles ×

Actor Effect Script Not Working


mojavesuave

Recommended Posts


I want to make a custom actor effect that when applied to a creature, allows them to fully restore health at 50% health, play an effect shader, play a sound, play a message.


I have tried several variations of my script and none of them have ever worked despite successfully compiling.


I’ve tried using several other scripts as templates and followed the exact syntax with no luck.. I’m not sure whether my issue is the script, base effect, or actor effect. I’ve used other base effects as templates for mine and the same goes for actor effects.


Something I don't understand is that I can reference the creature in game, and manually write what is in my script into the console and it works fine....but the script does not.


script attempt 1:


scn TestEffectScript


short DoOnce


Begin Gamemode

If GetHealthPercentage <= 0.50 && DoOnce == 0

CastImmediateOnSelf TestActorEffect

PlaySound TestEffectSound

MessageEx "Enemy is effected"

Set DoOnce to 1

Endif

END


script attempt 2:


ScriptName TestEffectScript


Begin ScriptEffectUpdate

If GetHealthPercentage < 0.5

ResetHealth

PlaySound3D TestEffectSound

PMS TestEffect

MessageEx "Enemy is effected"

EndIf

End



Edited by mojavesuave
Link to comment
Share on other sites

  • Recently Browsing   0 members

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