- Joined
- Mar 31, 2015
- Messages
- 2
- Reaction score
- 0
- First Language
- English
- Primarily Uses
I was wondering if anyone could give me a hand with a variable problem i'm having?
Basically, my game involves time travelling. In order to do so, the player uses a time travel machine, this machine can be activated with several levers and switches.
Now the problem i'm having is that my plan was to initially have a variable that changes according to the player's reactions.
Here's an example.
For this, we will call the variable "Vortex".
So initially, Vortex should equal to the value of "50".
Once a switch has been activated which begins the variable, the value of the variable "Vortex" should decrease every second.
The player can stop this by activating a lever which increases the value of the variable Vortex.
If the Player manages to increase the variable's value so that it reaches the value of "100", they are successful.
If the player is unable to react fast enough and the variable's value drops below "20", they are unsuccessful.
In clearer terms, it should be like this.
Vortex = 50
IF SWITCH "First Vortex" Is ON THEN
Vortex - 5 ( Each Second).
IF Vortex <= 20 THEN
Player is Unsuccessful.
Else
IF Vortex => 75
Player is Successful.
Sorry for the strange post format.
I hope someone can be of help?
Basically, my game involves time travelling. In order to do so, the player uses a time travel machine, this machine can be activated with several levers and switches.
Now the problem i'm having is that my plan was to initially have a variable that changes according to the player's reactions.
Here's an example.
For this, we will call the variable "Vortex".
So initially, Vortex should equal to the value of "50".
Once a switch has been activated which begins the variable, the value of the variable "Vortex" should decrease every second.
The player can stop this by activating a lever which increases the value of the variable Vortex.
If the Player manages to increase the variable's value so that it reaches the value of "100", they are successful.
If the player is unable to react fast enough and the variable's value drops below "20", they are unsuccessful.
In clearer terms, it should be like this.
Vortex = 50
IF SWITCH "First Vortex" Is ON THEN
Vortex - 5 ( Each Second).
IF Vortex <= 20 THEN
Player is Unsuccessful.
Else
IF Vortex => 75
Player is Successful.
Sorry for the strange post format.
I hope someone can be of help?

