October 10, 2024, 11:53:14 PM
Welcome,
Guest
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Forum rules
-
please read before posting, it can save you a lot of time.
Home
Help
Search
Calendar
Login
Register
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Stopping cutscenes
« previous
next »
Pages: [
1
]
Print
Author
Topic: Stopping cutscenes (Read 7254 times)
0 Members and 1 Guest are viewing this topic.
Banbury
Lurker
Karma: 0
Offline
Posts: 36
I'm a llama! Mooh!
Stopping cutscenes
«
on:
January 28, 2003, 08:27:00 AM »
Hi,
how do I stop scripted cutscenes with a keypress? The key event doesn't respond while the cutscene is running. Do I have to place a 'Sleep' behind every function? Does the TimeSlice functions have something to do with it (I wasn't able to call it due to lack of documentation)?
Greetings
Banbury
Logged
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re:Stopping cutscenes
«
Reply #1 on:
January 28, 2003, 10:38:52 AM »
The "Keypress" event should work no matter it a scripted sequence is running or not. I think the easiest solution would be to:
1) set up a global variable and set it to false before you execute the cutscene
2) in the "keypress" event handler set the global variable to true
3) in the cutscene script check for the value of that global variable every now and then and if it's true, then interrupt the script (by return or something...).
By calling the Sleep command, you return control to the engine. But methods like GoTo or Talk call the Sleep command automatically so you don't have to call it explicitly.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
Banbury
Lurker
Karma: 0
Offline
Posts: 36
I'm a llama! Mooh!
Re:Stopping cutscenes
«
Reply #2 on:
January 28, 2003, 01:37:21 PM »
I tried to attach a script with my cutscene and then detaching in on a keypress. The event handler isn't executed though (tested it with a Msg).
I think it's a little messy to check at every line of my cutscene, if it has been canceled.
Greetings
Banbury
Logged
Mnemonic
WME developer
Administrator
Addicted to WME forum
Karma: 41
Offline
Gender:
Posts: 5683
Re:Stopping cutscenes
«
Reply #3 on:
January 28, 2003, 01:44:02 PM »
The "keypress" handler should be in a script that is attached to the Game object, because the Game recieves the keypresses.
And...yes, it is messy. But now that you mention it, detaching the cutscene script from the keypress handler should also work and it would be a much cleaner solution.
(Sorry, I can't test it right now)
«
Last Edit: January 28, 2003, 01:44:54 PM by Mnemonic
»
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum.
Print
Pages: [
1
]
« previous
next »
Wintermute Engine Forum
>
Wintermute Engine
>
Technical forum
>
Topic:
Stopping cutscenes