Jump to content

Cellattach not working outside


BuzzingMonkey

Recommended Posts

Hi - can someone help me

 

i started a mod to add a effectshader to all rocks that can be mined. It works inside (like in a mine) but not in the open world. I've attached the script to all of the activator base objects that start with mineore. Theres also a blank form list that they get added to when they have been mined to turn the effect off.

 

thanks in advance

 

scriptname OreGlow extends ObjectReference

 

EffectShader property myEffect auto

 

FormList Property MinedRocks Auto

 

Function StartEffect()

MyEffect.play(self)

EndFunction

 

Function StopEffect()

MyEffect.stop(self)

EndFunction

 

bool Function HasBeenMined

Return MinedRocks.HasForm(self)

EndFunction

 

bool Function HasNotBeenMined

Return !MinedRocks.HasForm(self)

EndFunction

 

Event OnCellAttach()

if HasNotBeenMined()

StartEffect()

endIf

EndEvent

 

Event OnDestructionStageChanged(int aiOldStage, int aiCurrentStage)

StopEffect()

MinedRocks.AddForm(self)

EndEvent

 

Event OnReset()

MinedRocks.RemoveAddedForm(self)

StartEffect()

EndEvent

Edited by BuzzingMonkey
Link to comment
Share on other sites

  • Recently Browsing   0 members

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