Jump to content

Timer Script


lolzinator42

Recommended Posts

I need to check if this script will actually run, because I don't think it is running.

 

scn RadVisualScript4

short rnd
float timer

Begin ScriptEffectStart
set rnd to GetRandomPercent

If (timer < 30)
set timer to timer + getSecondsPassed
Else
If (rnd >= 75)
imod ImageSpaceConcussion
endif
endif
End

Begin ScriptEffectFinish
rimod ImageSpaceConcussion
End

Edited by lolzinator42
Link to comment
Share on other sites

All the functions and structure is correct. but, you are running that in the wrong blocktype.... let me explain this code will only be used when the person gets affected by this buff/skill/effect. So, timer will only be 0 because you initialize the code when the time is zero and only run through it once. To fix this problem you can copy my edit.

 

scn RadVisualScript4

short rnd
float timer

Begin ScriptEffectStart
set rnd to GetRandomPercent
End

Begin GameMode; this is the main game loop

If (timer < 30)
set timer to timer + getSecondsPassed
Else
If (rnd >= 75)
imod ImageSpaceConcussion
endif
endif
End

Begin ScriptEffectFinish
rimod ImageSpaceConcussion
End

Link to comment
Share on other sites

  • Recently Browsing   0 members

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