Jump to content

What's wrong with this script?


15gudasc

Recommended Posts

Hey everyone!

 

So this script is supposed to disable a reference called "thunder" at 6:00 A.M. and enable it at 10:00 P.M., but it doesn't want to save.

 

scn thunderscript

 

short time

 

set time to GetCurrentTime

 

Begin Gamemode

 

if time == 18

THUNDER01ref.disable

endif

 

if time == 22

THUNDER01ref.enable

endif

 

END

Link to comment
Share on other sites

So here's what the script looks like now....

 

scn thunderscript

 

short time

 

Begin Gamemode

set time to GetCurrentTime

 

if time > 6.0

THUNDER01.disable

showmessage successfulscript

endif

 

if time > 22.0

THUNDER01.enable

showmessage successfulscript

endif

 

 

But it still doesn't want to work! Any thoughts?

END

Link to comment
Share on other sites

1. By what way are you calling this script (quest/token object)?

2. Did you add 'THUNDER01ref' to a world-space cell? Did you set it to persistent reference? Objects that do not exist in the world-space, or do not have a unique editor ID/parent cannot be enabled/disabled.

 

The script should look something like this:

scn thunderscript

Begin Gamemode

    if (GetCurrentTime > 6) && (GetCurrentTime < 22)
         if THUNDER01ref.GetDisabled == 0
              THUNDER01ref.Disable
         endif
    elseif THUNDER01ref.GetDisabled
         THUNDER01ref.Enable
    endif

end

Edited by pluramon
Link to comment
Share on other sites

  • Recently Browsing   0 members

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