Difference between revisions of "A beginner's guide, lesson 5 - Anatomy of a quest, part 2"

Jump to navigation Jump to search
m
modifying identation on long lines
imported>Juharfalvi
m (adding external link)
imported>Juharfalvi
m (modifying identation on long lines)
Line 168: Line 168:
       '''if ( IsPCSleeping == 1 && player.getincell AnvilBenirusManorHaunted == 1 )'''
       '''if ( IsPCSleeping == 1 && player.getincell AnvilBenirusManorHaunted == 1 )'''
   
   
  ''(A set of '''nested if''' conditions. '''IF''' statements are the bread and butter of scripting. As such I will save a special place for them in the next tutorial. Just for now note double '''==''' for '''equal to''')''
  ''(A set of '''nested if''' conditions. '''IF''' statements are the bread and butter of scripting.''
''As such I will save a special place for them in the next tutorial.''
''Just for now note double '''==''' for '''equal to''')''
   
   
  '''MS02GhostTest1Ref.Enable'''
  '''MS02GhostTest1Ref.Enable'''
Line 203: Line 205:
  '''if ( GetStage MS02 == 30 )'''
  '''if ( GetStage MS02 == 30 )'''
       '''if ( Player.GetDistance MS02BenirusManorWaitFollow <= 500 )'''
       '''if ( Player.GetDistance MS02BenirusManorWaitFollow <= 500 )'''
  (''This uses one of the '''Get'''something family of functions to find the distance of the player from an x-marker in the Benirus Manor Cell. Look in the cells object list. '''Get''' type functions are information retrieval functions'')
  (''This uses one of the '''Get'''something family of functions to find the distance''
''of the player from an x-marker in the Benirus Manor Cell.''
''Look in the cells object list. '''Get''' type functions are information retrieval functions'')
    
    
  '''setstage MS02 35'''
  '''setstage MS02 35'''
Line 221: Line 225:
   
   
  '''begin onDeath'''
  '''begin onDeath'''
  ''(Begins when the Actor (ghost) dies. Because this is a reference script attached to the ghost it assumes we mean when the ghost dies, and we don't have to give a reference)''
  ''(Begins when the Actor (ghost) dies. Because this is a reference script attached to the ghost''
''it assumes we mean when the ghost dies, and we don't have to give a reference)''
   
   
  ''';This part of the script enables the inital Ghost Generation & Sets Journal 40'''
  ''';This part of the script enables the inital Ghost Generation & Sets Journal 40'''
Line 235: Line 240:
   
   
  ''(This is another really useful bit of script. It is a forced
  ''(This is another really useful bit of script. It is a forced
  Evaluation of the AI Package that an NPC is using. It is used when we
  Evaluation of the AI Package that an NPC is using.''
change a key game condition that affects packages and want it to have
''It is used when we change a key game condition that affects packages and want it to have''
  an immediate effect. Normally Actor evaluate its AI once an hour.  
  ''an immediate effect. Normally Actor evaluate its AI once an hour.''
  When evaluating it choses the first valid AI package in its list'')
  ''When evaluating it choses the first valid AI package in its list'')
   
   
  '''VelwynBenirusRef.MoveTo MS02VelwynArrivalMarker'''
  '''VelwynBenirusRef.MoveTo MS02VelwynArrivalMarker'''
Anonymous user

Navigation menu