Jump to content

Oblivion TESIV: How does a Mod activate during a game?


kwoodard65

Recommended Posts

My mod used to self-activate but now I have to use the command line. It appears to start and then crash the game. I can set the stage for a higher quest number to begin playing the Mod. I have used TES4Edit Autoclean on my Mod and it loads without issue under CS with no script compilation issues.

Link to comment
Share on other sites

This is the beginning of my script:

if (DoOnce1 == 0)
    SetStage WaV001 1
    Set DoOnce1 to 1
endif

; Check Player Status
    If  ( GetStage WaV001  >= 1 )  &&  ( WaV001 <= 10 )
        Set SetPCInfamy to 1
        Set PlayerRef.SetCrimeGold to 0
        Set ModDisposition to PlayerRef 100
    Endif
;End code    
    
    If ( GetStage WaV001 == 1 )  &&  ( WaV001 < 2 )
        PlaySound AMBWhiteout2D
        message "As you abide about your day, you suddenly feel dizzy and then the world begins spinning around you in white light!"
        Set GameTimer to 1
        Set GameTimer to ( GameTimer + GetSecondsPassed )
        ElseIf ( GameTimer <= 6)  &&  ( GetStage WaV001 == 1 )  &&  ( WaV001 < 2 )
                   PlayerRef.MoveToMarker WaVLadyGreetingMarkerRef
        Set GameTimer to 1
    Endif

Link to comment
Share on other sites

You have a lot of errors in that script.  Here is a correction of the part that has a lot:

 If  ( GetStage WaV001  >= 1 )  &&  ( GetStage WaV001 <= 10 )
        ModPCInfamy  1      ; Are you trying to actualy set if to 1 or just add 1 to it??
        PlayerRef.SetCrimeGold 0
        ActorRef.ModDisposition PlayerRef 100   ; In an object script on an NPC, the ActorRef is implied, but in a quest script you have to specify it.
    Endif

Go here to look up script commands (and here for OBSE commands that may not be in the Wiki list), so you can know how to use them.

Link to comment
Share on other sites

The last part with timer is also very messy. Was it supposed to show a message and after some time teleport player somewhere?

    If ( GetStage WaV001 == 1 )  &&  ( GetStage WaV001 < 2 )
      	;first play sound and show a message
      	if GameTimer == 0 
       	 PlaySound AMBWhiteout2D
       	 message "As you abide about your day, you suddenly feel dizzy and then the world begins spinning around you in white light!"
       	 Set GameTimer to 1
      	endif
        ;wait a moment
        if GameTimer >= 1
       	 Set GameTimer to ( GameTimer + GetSecondsPassed )
        endif
        if (GameTimer >= 6) ;after 6 seconds
           Set GameTimer to -1 ;deactivate timer
           PlayerRef.MoveToMarker WaVLadyGreetingMarkerRef ;move player
        endif
    Endif

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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