﻿ Leaving the scene after all is done
• May 26, 2024, 06:40:57 AM
• Welcome, Guest

### News:

Forum rules - please read before posting, it can save you a lot of time.

Pages: [1]

### AuthorTopic: Leaving the scene after all is done  (Read 3819 times)

0 Members and 1 Guest are viewing this topic.

#### benkovici

• Lurker
• Karma: 0
• Offline
• Posts: 23
##### Leaving the scene after all is done
« on: February 12, 2009, 02:05:21 PM »

Hello! How to do that the actor could leave a scene only after all the puzzles are solved and all the things collected??

For example: the first chapter of my game consists of 4 scenes. To leave this chapter the actor must find a key to open the gate. He can find this key befor collecting other items and solving puzzles. So how to permit the actor to open the gate only after all in this chapter is done?
Logged

#### Birdline

• Supporter
• Occasional poster
• Karma: 0
• Offline
• Gender:
• Posts: 57
##### Re: Leaving the scene after all is done
« Reply #1 on: February 12, 2009, 04:56:17 PM »

You have to use some global variables. One for each puzzle/thing collected.
When collect each thing or solve each puzzle, you should give those variables a value (true/false).
So, to permit leaving the chapter, you check if all variables have the correct value.

Spyros

#### benkovici

• Lurker
• Karma: 0
• Offline
• Posts: 23
##### Re: Leaving the scene after all is done
« Reply #2 on: February 12, 2009, 07:51:32 PM »

Thanks for help! I thought about global variables but I deemed there is an easy way to solve this problem
Logged

#### sychron

• Wanderer zwischen den Welten
• Global Moderator
• Regular poster
• Karma: 0
• Offline
• Posts: 223
• There is no spoon. The enemy gate is down!
##### Re: Leaving the scene after all is done
« Reply #3 on: February 14, 2009, 05:28:57 PM »

Well, this IS the easy way ;-)
Logged
... delete the inner sleep ...
Pages: [1]

Page created in 0.027 seconds with 18 queries.