Jump to content

Recommended Posts

Hi, I am trying to apply some effects on player when he enters a "radiation zone". 
 

handle = ppEffectCreate ["FilmGrain", 2000];
handle ppEffectEnable true;
handle ppEffectAdjust [0.3, 0.15, 1, 0.2, 0.5, 0];
handle ppEffectCommit 3;

//terminate with 
ppEffectDestroy handle;

I tried run this from trigger, its working but didn't find a way to terminate the script via the handle when the player get out from the zone ... I will be grateful for any ideas ...   

Share this post


Link to post
Share on other sites

Store the handle on the trigger using setVariable.

_handle = ppEffectCreate ["FilmGrain", 2000];
_handle ppEffectEnable true;
_handle ppEffectAdjust [0.3, 0.15, 1, 0.2, 0.5, 0];
_handle ppEffectCommit 3;
thisTrigger setVariable[ "ppEffect", _handle ];

//terminate with 
ppEffectDestroy ( thisTrigger getVariable "ppEffect" );

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

@Larrow you are the man, thank you so much ! :thumb:

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×