SCI Studio Tutorial 2 Chapter 6 - Checking a Door's State

From Sierra Wiki
Jump to navigationJump to search

SCI Tutorials and Guides Table of Contents
SCI Studio Tutorial 2 Table of Contents

Chapter: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

Chapter 6 - Checking a Door's State">



Introduction

Checking a door's state is incredibly easy. Each door contains a property named doorState. By reading the doorState property, you can find out whether the door is opened, closed or opening.

Here's an example of finding out the state:

Code:
(if( == (aDoor:doorState) DOOR_OPEN)
  Print("The door is open")
)(else
  (if( == (aDoor:doorState) DOOR_CUED)
    Print("The door is opening")
  )(else
    Print("The door is closed")
  )
)

That sums it up!


References



Related Links

  •  

 

SCI Tutorials and Guides Table of Contents
SCI Studio Tutorial 2 Table of Contents

< Previous: Chapter 5 - Allowing Actors to Walk Through/Over Views/Props Next: Chapter 7 - Creating Custom Buttons >