home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CyberMycha 2006 April
/
SGP.iso
/
dema
/
Keepsake-Demo-en-li-v1.0.exe
/
res
/
scripts
/
vision.tcl
< prev
Wrap
Text File
|
2006-01-25
|
22KB
|
728 lines
################################################################################
# ##
# file vision.tcl ##
# brief Events for the Visions. ##
# ##
################################################################################
## ===================================================== ##
## Loading script from source ##
## ===================================================== ##
source "[AUTO]/visions.mvwrap.tcl"
source "[AUTO]/visions.camera.tcl"
## ===================================================== ##
## Initialization ##
## ===================================================== ##
event "init" {
}
################################################################################
## ========================================================================== ##
## DOOR BLOCKING & PUZZLE SECTION ##
## ========================================================================== ##
################################################################################
# NONE FOR NOW
################################################################################
## ========================================================================== ##
## ANIMATION & SPECIAL CAMERA SECTION ##
## ========================================================================== ##
################################################################################
## ===================================================== ##
## The after effect of the first Vision ##
## ===================================================== ##
proc subtitle {widget label who text delay} {
set color "1 1 1"
oz'event {
eval "oz'label::property $label -color $color -text \\\"$text\\\""
}
oz'event {
oz'widget::fadeto $widget 1 0.1
oz'delay 0.1
}
oz'event {
oz'delay [expr $delay - 0.2]
}
oz'event {
oz'widget::fadeto $widget 0 0.1
oz'delay 0.1
}
}
proc qPlayVision1 {} {
set l [new oz'label "label" 0.8 0.25]
set w [new oz'widget "widget"]
oz'label::property $l -pos 0.1 0.75 -font caligula.ttf -fsize 20 -alpha 1
oz'widget::property $w -alpha 0
oz'widget::child $w $l 0
oz'widget::child [FOREGROUNDWIDGET] $w 0
vision1::new vision -foreground -depth 0.5 -nopan
ozqSound::NewFX "sound/vo/$::LNG/vision1/vision1.ogg"
wizqQueue 1 [subst {
oz'event {oz'delay 8.5}
subtitle $w $l Lydia "$::lng::firstVisionYL1" 3
subtitle $w $l Celeste "$::lng::firstVisionYC1" 6
oz'event {oz'delay 0.5}
subtitle $w $l Lydia "$::lng::firstVisionYL2" 3.5
oz'event {oz'delay 1}
subtitle $w $l Celeste "$::lng::firstVisionYC2" 3
oz'event {oz'delay 0.5}
subtitle $w $l Celeste "$::lng::firstVisionYC3" 3.5
subtitle $w $l Lydia "$::lng::firstVisionYL3" 2
subtitle $w $l Celeste "$::lng::firstVisionYC4" 4.5
oz'event {oz'delay 0.5}
subtitle $w $l Lydia "$::lng::firstVisionYL4" 3.5
oz'event {oz'delay 0.5}
subtitle $w $l Celeste "$::lng::firstVisionYC5" 4.5
subtitle $w $l Celeste "$::lng::firstVisionYC6" 8
oz'event {oz'delay 1}
subtitle $w $l Celeste "$::lng::firstVisionYC7" 1.5
oz'event {oz'delay 0.5}
subtitle $w $l Lydia "$::lng::firstVisionYL5" 12.5
subtitle $w $l Celeste "$::lng::firstVisionYC8" 8.5
subtitle $w $l Lydia "$::lng::firstVisionYL6" 1.5
subtitle $w $l Lydia "$::lng::firstVisionYL7" 3.5
oz'event {oz'delay 0.5}
subtitle $w $l Celeste "$::lng::firstVisionYC9" 3.15
subtitle $w $l Lydia "$::lng::firstVisionYL8" 3
subtitle $w $l Lydia "$::lng::firstVisionYL9" 9
subtitle $w $l Celeste "$::lng::firstVisionYC10" 7
subtitle $w $l Lydia "$::lng::firstVisionYL10" 6
subtitle $w $l Celeste "$::lng::firstVisionYC11" 2.5
subtitle $w $l Lydia "$::lng::firstVisionYL11" 4.5
oz'event {oz'delay 1}
subtitle $w $l Celeste "$::lng::firstVisionC1" 1.5
oz'event {oz'delay 0.5}
subtitle $w $l Lydia "$::lng::firstVisionL1" 4.5
oz'event {delete $l}
oz'event {delete $w}
}]
chainEvent {
standardFadein
}
wq'widget::waitfor $vision1::vision -animate
wq'widget::delete& vision1::vision
chainEvent {
cameraFadeout 0
}
# Wait for Block 1
wizqWaitQueue 1
}
## ===================================================== ##
## The after effect of the first Vision ##
## ===================================================== ##
event "firstVisionTeleport" {
oz'event {
SetAmbient 2d ambiance/forest "0 0 0" 0 0
SetAmbient 3d sfx/fallsFar "130 144 870" 10000 0
SetAmbient 3d sfx/dragonFountainLoop "227 71 157" 30 0 0.6
SetAmbient 3d sfx/gardenPond "245 71 270" 30 0 0.6
}
oz'event {oz'track::stop $::music_track}
chainEvent {
standardFadeout
hideInterface
hideMouse
}
chainEvent {
wizEntityHide Lydia
wizEntityHide Zak
wizEntityStopFollow Zak
}
qPlayVision1
chainEvent {
wizEntitySetPosition Lydia "358.6 87.7 275"
wizEntitySetOrientation Lydia 200
wizEntitySetPosition Zak "312.8 86.1 271.1"
setScene "dragonvaleHallway" worldBridge
setCamera "mainbridge"
wizhCameraChange
}
chainEvent {
showInterface
showMouse
stopMovie
wizEntityShow Lydia
wizEntityShow Zak
}
chainEvent {
standardFadein
}
ozSet "visionOne" "viewed"
callEvent "dollEffectOne"
}
################################################################################
## ========================================================================== ##
## NPC DIALOGUE SECTION ##
## ========================================================================== ##
################################################################################
# NONE FOR NOW
################################################################################
## ========================================================================== ##
## FORCED DIALOGUE SECTION ##
## ========================================================================== ##
################################################################################
## ===================================================== ##
## The Doll effect after the first Vision ##
## ===================================================== ##
event "dollEffectOneDEMOBETA" {
checkConversation "dollEffectOneDEMOBETA" {
chainEvent {
freezePlayer
wizDisableFloorevent
wizDisableMouse
wizEntityStopFollow Zak
ozDisable "panning"
}
chainEvent { oz'track::play $::music_track "sound/music/dollEffect.ogg" }
chainEvent { delay 500 }
chainEvent { ozSet "zakDiscovery" "complete" }
# Block 1
wizqQueue 1 {
wizqEntityAction Lydia standDisbelief "wait"
wizqEntityRun Lydia "359.9 0.3 128" "wait"
wizqEntityAction Lydia standLookAway "wait"
}
wizqTalkOpen
wizqTalkSay Lydia $::lng::dollEffectOneL1 "sound/vo/$::LNG/scenes/vision/dollEffectOneL1.ogg"
wizqTalkSay Lydia $::lng::dollEffectOneL2 "sound/vo/$::LNG/scenes/vision/dollEffectOneL2.ogg"
wizqTalkSay Lydia $::lng::dollEffectOneL3 "sound/vo/$::LNG/scenes/vision/dollEffectOneL3.ogg"
wizqTalkClose
# Wait for Block 1
wizqWaitQueue 1
# Block 2
wizqQueue 1 {
wizqEntityWalk Zak "374.2 0.3 102.6" "wait"
chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
}
# Block 2-B
wizqQueue 2 {
chainEvent { delay 500 }
wizqEntityAction Lydia standSurprise "wait"
wizqEntitySetOrientationTarget Lydia Zak
}
wizqTalkOpen
wizqTalkSay Zak $::lng::dollEffectOneZ1 "sound/vo/$::LNG/scenes/vision/dollEffectOneZ1.ogg" fastout
wizqTalkSay Lydia $::lng::dollEffectOneL4 "sound/vo/$::LNG/scenes/vision/dollEffectOneL4.ogg" fastin
# Wait for Block 2 & 2-B
wizqWaitQueue 1
wizqWaitQueue 2
wizqEntitySetOrientationTarget Lydia None
# Block 3
wizqQueue 1 {
wizqEntityAction Lydia standYes "wait"
wizqEntityAction Lydia standWhat "wait"
}
wizqTalkSay Lydia $::lng::dollEffectOneL5 "sound/vo/$::LNG/scenes/vision/dollEffectOneL5.ogg"
# Wait for Block 3
wizqWaitQueue 1
# Block 4
wizqQueue 1 {
wizqEntitySetOrientationTarget Lydia Zak
}
# Block 4-B
wizqQueue 2 {
wizqEntityWalk Zak "368 0.3 117.7" "wait"
chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
wizqEntityAction Lydia standHandOnChin "wait"
}
wizqTalkSay Zak $::lng::dollEffectOneZ3 "sound/vo/$::LNG/scenes/vision/dollEffectOneZ3.ogg"
# Wait for Block 4 & 4-B
wizqWaitQueue 1
wizqWaitQueue 2
wizqEntitySetOrientationTarget Lydia None
# Block 5
wizqQueue 1 {
wizqEntityAction Lydia standWhat "wait"
}
wizqTalkSay Lydia $::lng::dollEffectOneL7 "sound/vo/$::LNG/scenes/vision/dollEffectOneL7.ogg"
# Block 5-B
wizqQueue 2 {
chainEvent { delay 1000 }
wizqEntityAction Zak standNo "wait"
}
wizqTalkSay Zak $::lng::dollEffectOneZ4 "sound/vo/$::LNG/scenes/vision/dollEffectOneZ4.ogg" fastout
# Wait for Block 5 & 5-B
wizqWaitQueue 1
wizqWaitQueue 2
# Block 6
wizqQueue 1 {
chainEvent { delay 1000 }
wizqEntityAction Lydia standYes "wait"
wizqEntityAction Lydia standDisbelief
}
wizqTalkSay Lydia $::lng::dollEffectOneL8 "sound/vo/$::LNG/scenes/vision/dollEffectOneL8.ogg" fastin
# Wait for Block 6
wizqWaitQueue 1
# Block 7
wizqQueue 1 {
wizqEntityAction Zak standRelax "wait"
}
# Block 7-B
wizqQueue 2 {
chainEvent { delay 1000 }
wizqEntityAction Lydia standArmCross "wait"
}
wizqTalkSay Zak $::lng::dollEffectOneZ5 "sound/vo/$::LNG/scenes/vision/dollEffectOneZ5.ogg"
# Wait for Block 7 & 7-B
wizqWaitQueue 1
wizqWaitQueue 2
# Block 8
wizqQueue 1 {
wizqEntityAction Lydia standNo "wait"
wizqEntityWalk Lydia "350.4 0.3 137.6" "wait"
chainEvent { delay 100 }
chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
wizqEntitySetCycle Lydia standCycleNormal
chainEvent { delay 500 }
wizqEntityAction Lydia standHandOnChin "wait"
}
# Block 8-B
wizqQueue 2 {
wizqEntitySetOrientationTarget Zak Lydia
}
wizqTalkSay Lydia $::lng::dollEffectOneL9 "sound/vo/$::LNG/scenes/vision/dollEffectOneL9.ogg"
wizqTalkSay Lydia $::lng::dollEffectOneL10 "sound/vo/$::LNG/scenes/vision/dollEffectOneL10.ogg"
# Wait for Block 8 & 8-B
wizqWaitQueue 1
wizqWaitQueue 2
wizqEntitySetOrientationTarget Zak None
# Block 9
wizqQueue 1 {
wizqEntityWalk Zak "359.9 0.3 128" "wait"
chainEvent { delay 1000 }
wizqEntityAction Zak standConfusedRight "wait"
}
wizqTalkSay Zak $::lng::dollEffectOneZ8 "sound/vo/$::LNG/scenes/vision/dollEffectOneZ8.ogg"
# Wait for Block 9
wizqWaitQueue 1
# Block 10
wizqQueue 1 {
wizqEntityAction Lydia standTalkTwoHands "wait"
}
wizqTalkSay Lydia $::lng::dollEffectOneL11 "sound/vo/$::LNG/scenes/vision/dollEffectOneL11.ogg"
# Block 10-B
wizqQueue 2 {
chainEvent { delay 3000 }
wizqEntityWalk Zak "385.2 0.3 51.1"
}
wizqTalkSay Zak $::lng::dollEffectOneZ9 "sound/vo/$::LNG/scenes/vision/dollEffectOneZ9.ogg"
# Wait for Block 10
wizqWaitQueue 1
# Block 11
wizqQueue 1 {
wizqEntityAction Lydia standLoseHope "wait"
}
wizqTalkSay Lydia $::lng::dollEffectOneL12 "sound/vo/$::LNG/scenes/vision/dollEffectOneL12.ogg"
wizqTalkClose
# Wait for Block 11 & 10-B
wizqWaitQueue 1
wizqWaitQueue 2
chainEvent { setCamera "nGateCloseup" }
# Block 12
wizqQueue 1 {
wizqEntityAction Lydia standHandOnChin "wait"
}
wizqTalkOpen
wizqTalkSay Lydia $::lng::dollEffectOneL13 "sound/vo/$::LNG/scenes/vision/dollEffectOneL13.ogg"
wizqTalkSay Zak $::lng::dollEffectOneZ10 "sound/vo/$::LNG/scenes/vision/dollEffectOneZ10.ogg"
wizqTalkClose
# Wait for Block 12
wizqWaitQueue 1
if { [getVar "whyWalkHere"] == "" } {
setEventPriority optionnalConversation.whyWalkHere emergency
ozSet "whyWalkHere" "initiated"
}
if { [getVar "whoIsCeleste"] == "" } {
setEventPriority optionnalConversation.whoIsCelesteBehavior long
ozSet "whoIsCeleste" "initiated"
}
if { [getVar "dollAsKeepsake"] == "" } {
setEventPriority optionnalConversation.dollAsKeepsakeBehavior long
ozSet "dollAsKeepsake" "initiated"
}
chainEvent {
unfreezePlayer
wizEnableFloorevent
wizEntityResumeFollow Zak
wizEnableMouse
ozEnable "panning"
}
chainEvent {
ozqSound::NewFX "sound/interface/itemPickUp.ogg"
iq'showdesc doll
}
}
}
## ===================================================== ##
## The Doll effect after the first Vision ##
## ===================================================== ##
event "dollEffectOne" {
checkConversation "dollEffectOne" {
chainEvent {
freezePlayer
wizDisableFloorevent
wizDisableMouse
wizEntityStopFollow Zak
}
#FIXME check this to add in the real thing
chainEvent { oz'track::play $::music_track "sound/music/dollEffect.ogg" }
chainEvent { delay 500 }
chainEvent { ozSet "zakDiscovery" "complete" }
# Block 1
wizqQueue 1 {
wizqEntityAction Lydia standDisbelief "wait"
}
wizqTalkOpen
wizqTalkSay Lydia $::lng::dollEffectOneL1 "sound/vo/$::LNG/scenes/vision/dollEffectOneL1.ogg"
wizqTalkSay Lydia $::lng::dollEffectOneL2 "sound/vo/$::LNG/scenes/vision/dollEffectOneL2.ogg"
wizqTalkSay Lydia $::lng::dollEffectOneL3 "sound/vo/$::LNG/scenes/vision/dollEffectOneL3.ogg"
wizqTalkClose
# Wait for Block 1
wizqWaitQueue 1
wizqEntityAction Lydia standLookAway "wait"
# Block 2
wizqQueue 1 {
wizqEntityChangeWalkSpeed Zak 20
wizqEntityWalk Zak "349 87.7 270.8" "wait"
chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
wizqEntitySetOrientationTarget Lydia None
}
# Block 2-B
wizqQueue 2 {
chainEvent { delay 1500 }
wizqEntityAction Lydia standSurprise "wait"
wizqEntitySetOrientationTarget Lydia Zak
}
wizqTalkOpen
wizqTalkSay Zak $::lng::dollEffectOneZ1 "sound/vo/$::LNG/scenes/vision/dollEffectOneZ1.ogg"
wizqTalkSay Lydia $::lng::dollEffectOneL4 "sound/vo/$::LNG/scenes/vision/dollEffectOneL4.ogg"
# Wait for Block 2 & 2-B
wizqWaitQueue 1
wizqWaitQueue 2
wizqEntitySetOrientationTarget Lydia None
wizqEntityChangeWalkSpeed Zak default
# Block 3
wizqQueue 1 {
wizqEntityAction Lydia standYes "wait"
wizqEntityAction Lydia standWhat "wait"
}
wizqTalkSay Lydia $::lng::dollEffectOneL5 "sound/vo/$::LNG/scenes/vision/dollEffectOneL5.ogg"
# Wait for Block 3
wizqWaitQueue 1
# Block 4-B
wizqQueue 2 {
chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
}
# Wait for Block 4 & 4-B
wizqWaitQueue 1
wizqWaitQueue 2
# Block 6
wizqQueue 1 {
wizqEntitySetCycle Zak sitCycleNormal
chainEvent { delay 200 }
wizqEntityAction Lydia standHandOnChin "wait"
}
wizqTalkSay Zak $::lng::dollEffectOneZ3 "sound/vo/$::LNG/scenes/vision/dollEffectOneZ3.ogg"
# Wait for Block 6
wizqWaitQueue 1
# Block 11
wizqQueue 1 {
chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
wizqEntitySetCycle Lydia standCycleNormal
wizqEntityAction Lydia standWhat "wait"
}
wizqEntitySetOrientationTarget Lydia None
wizqTalkSay Lydia $::lng::dollEffectOneL7 "sound/vo/$::LNG/scenes/vision/dollEffectOneL7.ogg"
# Block 5-B
wizqQueue 2 {
chainEvent { delay 1000 }
wizqEntityAction Zak sitNo "wait"
}
wizqTalkSay Zak $::lng::dollEffectOneZ4 "sound/vo/$::LNG/scenes/vision/dollEffectOneZ4.ogg" fastout
# Wait for Block 5 & 5-B
wizqWaitQueue 1
wizqWaitQueue 2
# Block 6
wizqQueue 1 {
chainEvent { delay 1000 }
wizqEntityAction Lydia standYes "wait"
wizqEntityAction Lydia standDisbelief
}
wizqTalkSay Lydia $::lng::dollEffectOneL8 "sound/vo/$::LNG/scenes/vision/dollEffectOneL8.ogg" fastin
# Wait for Block 6
wizqWaitQueue 1
# Block 7
wizqQueue 1 {
wizqEntitySetCycle Zak standCycleNormal
wizqEntityAction Zak standConfusedRight "wait"
}
# Block 7-B
wizqQueue 2 {
chainEvent { delay 1000 }
wizqEntityAction Lydia standArmCross "wait"
}
wizqTalkSay Zak $::lng::dollEffectOneZ5 "sound/vo/$::LNG/scenes/vision/dollEffectOneZ5.ogg"
# Wait for Block 7 & 7-B
wizqWaitQueue 1
wizqWaitQueue 2
# Block 8
wizqQueue 1 {
wizqEntityAction Lydia standNo "wait"
chainEvent { delay 100 }
chainEvent { wizEntityLookAt Lydia [wizEntityGetPosition Zak] }
wizqEntitySetCycle Lydia standCycleNormal
chainEvent { delay 500 }
wizqEntityAction Lydia standHandOnChin "wait"
}
# Block 8-B
wizqQueue 2 {
wizqEntitySetOrientationTarget Zak Lydia
}
wizqTalkSay Lydia $::lng::dollEffectOneL9 "sound/vo/$::LNG/scenes/vision/dollEffectOneL9.ogg"
# Wait for Block 8 & 8-B
wizqWaitQueue 1
# Block 8
wizqQueue 1 {
wizqEntityAction Lydia standYes "wait"
}
wizqTalkSay Lydia $::lng::dollEffectOneL10 "sound/vo/$::LNG/scenes/vision/dollEffectOneL10.ogg"
# Wait for Block 8 & 8-B
wizqWaitQueue 1
wizqWaitQueue 2
wizqEntitySetOrientationTarget Zak None
# Block 9
wizqQueue 1 {
chainEvent { delay 1000 }
wizqEntityAction Zak standConfusedRight "wait"
}
# Block 14
wizqQueue 1 {
wizqEntityWalk Zak "336.6 87.7 270" "wait"
chainEvent { delay 100 }
chainEvent { wizEntityLookAt Zak [wizEntityGetPosition Lydia] }
wizqEntitySetCycle Zak standCycleNormal
wizqEntitySetOrientationTarget Lydia None
}
# Block 14-B
wizqQueue 2 {
wizqEntitySetOrientationTarget Lydia Zak
}
wizqTalkSay Zak $::lng::dollEffectOneZ8 "sound/vo/$::LNG/scenes/vision/dollEffectOneZ8.ogg"
# Wait for Block 9
wizqWaitQueue 1
# Block 11
wizqQueue 1 {
wizqEntityAction Lydia standLoseHope "wait"
}
wizqTalkSay Lydia $::lng::dollEffectOneL12 "sound/vo/$::LNG/scenes/vision/dollEffectOneL12.ogg"
wizqTalkClose
# Wait for Block 11 & 10-B
wizqWaitQueue 1
wizqWaitQueue 2
if { [getVar "whoIsCeleste"] == "" } {
setEventPriority optionnalConversation.whoIsCelesteBehavior long
ozSet "whoIsCeleste" "initiated"
}
if { [getVar "dollAsKeepsake"] == "" } {
setEventPriority optionnalConversation.dollAsKeepsakeBehavior long
ozSet "dollAsKeepsake" "initiated"
}
chainEvent {
unfreezePlayer
wizEnableFloorevent
wizEntityResumeFollow Zak
wizEnableMouse
ozEnable "panning"
}
chainEvent {
ozqSound::NewFX "sound/interface/itemPickUp.ogg"
iq'showdesc doll
}
}
}
################################################################################
## ========================================================================== ##
## OPTIONNAL DIALOGUE SECTION ##
## ========================================================================== ##
################################################################################
# NONE FOR NOW
################################################################################
## ========================================================================== ##
## TO ADD/ CORRECTIONS NEEDED ##
## ========================================================================== ##
################################################################################
# NONE FOR NOW
################################################################################
## ========================================================================== ##
## TO CHECK ##
## ========================================================================== ##
################################################################################
# NONE FOR NOW