im making a horror game and i want to make something like i have to interact the door like 10 or more times before the door can open... So how do i do that 🙂 ?
Sorry im kinda bit beginner on this. and still kinda learning ^^;
p.s Sorry for my bad english though ^^;
You could do this using variables, each time the player interacts with the door you add 1 to the variable. When the variable reaches 10 the door opens.
Control Variables is the command to use, to set values on variables. NAme the variable ButtonMash.
(add +1 might suit your needs)
Now to check if a variable has a value of 10 (for your needs) you need a Conditional Branch that checks the ButtonMa0sh variable.
If it is >=10 you open the door (I assume you do the mash to open a door and escape)
Othwerwise it goes on doing nothing.
This must be set on a Parallel Process though, so it will check 60 times per second. Add a
Wait 10 command in there, to make it a little more lightweight, cause in parallel the events are too demanding on CPU resources.
I'm not currently able to show you an example, so I will try to explain it as clear as possible.
So you have added the door event to your map and have it as 'Action Button'. Then, in the column in which you can put events, you go to the change variables, choose a variable and pick 'ADD' and 'constant', which is 1. Now, each time the player presses 'Enter' (or any action button) at the door, the variable increases by 1. Now you make a second page in the event, where you set a condition on the left, namely: the variable is equal to 10. When this is the case you put in the event column what you want to happen, probably a transfer event.
I hope this is clear enough for you, if not; feel free to send another message!
Thanks Guys I manage to make it Work ! 😀 😀