Jump to content

Need Help With This Script


infmaniac

Recommended Posts

The GECK wont seem to recognise the 'if' command it continually gives an error. Then for some reason it decided to let me compile it with a few 'if' commands saved and the script looked like it was working in game but as the last few only liked 'endif' it showed the 1st message box then straight after showed the last one therefore completing the quest which is a complete waste as there was no 'doing' the quest whatsoever. If someone can help me make this script work properly i will be massively greatful. Hoping there is an alternative 'if' command that the geck will accept instead of sometimes accepting. Im pretty desperate to get this starting quest script working fully. You will get credit for the script of course =)

 

 

 

 

SCN SilentHillStartQuest01

 

begin Gamemode

ShowMessage SHBeginQuestMSGBOX

ShowMap SHBeginQuestMarkerRef

SetStage SilentHillBeginingQuest 20

if ( Player.GetInCell SilentHillBeginningHome )

SetStage SilentHillBeginingQuest 30

if ( SilentHillBeginingQuest == 30 )

ShowMessage SHBeginQuestMSGBOX2

SetStage SilentHillBeginingQuest 40

if ( SilentHillBeginingQuest == 40 )

If Player.GetInCell SilentHillIntroStation

ShowMessage SHBeginQuestMSGBOX3

SetStage SilentHillBeginingQuest 50

if ( SilentHillBeginingQuest == 50 )

If Player.GetInCell OldSilentHill

ShowMessage SHBeginQuestMSGBOX4

RewardXP 50

StopQuest SilentHillBeginingQuest

 

endif

End

 

 

I accept there may be some mistakes but iv pretty much gone on what official scripts use. I hope this script is easily fixable but im getting annoyed with the fact the GECK sometimes accepts 'if' and sometimes doesnt even thou its the exact same place.

Edited by infmaniac
Link to comment
Share on other sites

It looks to me like you are missing a lot of 'EndIf's. Maybe try something like this:

 

SCN SilentHillStartQuest01

begin Gamemode
ShowMessage SHBeginQuestMSGBOX
ShowMap SHBeginQuestMarkerRef
SetStage SilentHillBeginingQuest 20

if ( Player.GetInCell SilentHillBeginningHome )
  SetStage SilentHillBeginingQuest 30
Endif
if ( SilentHillBeginingQuest == 30 )
  ShowMessage SHBeginQuestMSGBOX2
  SetStage SilentHillBeginingQuest 40
Endif
if ( SilentHillBeginingQuest == 40 )
  If Player.GetInCell SilentHillIntroStation
    ShowMessage SHBeginQuestMSGBOX3
    SetStage SilentHillBeginingQuest 50
  Endif
Endif
if ( SilentHillBeginingQuest == 50 )
  If Player.GetInCell OldSilentHill
    ShowMessage SHBeginQuestMSGBOX4
    RewardXP 50
    StopQuest SilentHillBeginingQuest
  Endif
Endif

End

 

P.S. You might what to check out this site Script Validator which will alert you to problems with your script as you type.

Edited by chocklymon
Link to comment
Share on other sites

after compiling the new script into the game it appears to work fine although the messagebox pops up every couple of seconds. iv tried splitting the script so that when the messagebox appears it will end one quest and begin a new one which is the rest of the original script. this way, the second quest script doesnt start. iv assigned the script to a quest that is start game enabled, priority 100, i tried telling the script to start the quest when the 1st messagebox is called up. no luck. i told the script to start whenever the game loads. no luck. its supposed to be one of them pop up quests that u can view in the pipboy. the GECK doesnt show any errors either. Scripting is a pain lol
Link to comment
Share on other sites

after compiling the new script into the game it appears to work fine although the messagebox pops up every couple of seconds.

That is because the 'begin gamemode' section of code is run every few seconds. Try something like this:

 

SCN SilentHillStartQuest01

begin Gamemode

 ; This if statement makes it so that the message will only play when the quest is at stage zero
 if( getstage SilentHillBeginingQuest == 0 )
   ShowMessage SHBeginQuestMSGBOX
   ShowMap SHBeginQuestMarkerRef
   SetStage SilentHillBeginingQuest 20
 endif

 ; Only run when the player is in the right place and on stage 20
 if ( Player.GetInCell SilentHillBeginningHome && getstage SilentHillBeginingQuest == 20)
   SetStage SilentHillBeginingQuest 30
   ; If removed since previously this block would have run right after the one above
   ShowMessage SHBeginQuestMSGBOX2
   SetStage SilentHillBeginingQuest 40
 Endif
 
 if ( getstage SilentHillBeginingQuest == 40 && Player.GetInCell SilentHillIntroStation)
   ShowMessage SHBeginQuestMSGBOX3
   SetStage SilentHillBeginingQuest 50
 Endif
 
 if ( getstage SilentHillBeginingQuest == 50 && Player.GetInCell OldSilentHill)
   ShowMessage SHBeginQuestMSGBOX4
   RewardXP 50
   StopQuest SilentHillBeginingQuest
 Endif

End

Edited by chocklymon
Link to comment
Share on other sites

  • Recently Browsing   0 members

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