HoyChampoy
Junior Member
Posts: 43
Threads: 16
Joined: Jun 2012
Reputation:
0
|
Scripting Problem Help Please
Hey Guys. I have a complicating problem. I am making a custom story and right now there are two map files. I have a level door that sends you from room 1 to room 2. I was able to allow the player to go back from room 2 to room 1 just in case they forgot something. But, in room 1, there are script areas that the player encounters that sets off a scare. The problem is that when a player leaves room 1 but decides to go back from room 2, they happen to run into a script area that they previously ran into earlier, causing the same scare to happen again. Also a door (not the level door) they had to unlock in room 1 becomes locked again. Is there a way to disable the script areas after you enter them, even if you leave the map, come back into the map, and enter the script area? Help would be very appreciated!
|
|
06-22-2012, 09:44 AM |
|
MaZiCUT
Senior Member
Posts: 536
Threads: 31
Joined: Jun 2012
Reputation:
17
|
RE: Scripting Problem Help Please
(06-22-2012, 09:44 AM)HoyChampoy Wrote: Hey Guys. I have a complicating problem. I am making a custom story and right now there are two map files. I have a level door that sends you from room 1 to room 2. I was able to allow the player to go back from room 2 to room 1 just in case they forgot something. But, in room 1, there are script areas that the player encounters that sets off a scare. The problem is that when a player leaves room 1 but decides to go back from room 2, they happen to run into a script area that they previously ran into earlier, causing the same scare to happen again. Also a door (not the level door) they had to unlock in room 1 becomes locked again. Is there a way to disable the script areas after you enter them, even if you leave the map, come back into the map, and enter the script area? Help would be very appreciated! Make the script area only true 1
meaning you cannot repeat the script.
Hi.
|
|
06-22-2012, 09:53 AM |
|
HoyChampoy
Junior Member
Posts: 43
Threads: 16
Joined: Jun 2012
Reputation:
0
|
RE: Scripting Problem Help Please
(06-22-2012, 09:53 AM)CrazyArts Wrote: (06-22-2012, 09:44 AM)HoyChampoy Wrote: Hey Guys. I have a complicating problem. I am making a custom story and right now there are two map files. I have a level door that sends you from room 1 to room 2. I was able to allow the player to go back from room 2 to room 1 just in case they forgot something. But, in room 1, there are script areas that the player encounters that sets off a scare. The problem is that when a player leaves room 1 but decides to go back from room 2, they happen to run into a script area that they previously ran into earlier, causing the same scare to happen again. Also a door (not the level door) they had to unlock in room 1 becomes locked again. Is there a way to disable the script areas after you enter them, even if you leave the map, come back into the map, and enter the script area? Help would be very appreciated! Make the script area only true 1
meaning you cannot repeat the script. they are all on true 1 already
|
|
06-22-2012, 09:58 AM |
|
Traggey
is mildly amused
Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation:
185
|
RE: Scripting Problem Help Please
Wrong forum, moved.
|
|
06-22-2012, 11:33 AM |
|
Cruzore
Senior Member
Posts: 301
Threads: 2
Joined: Jun 2012
Reputation:
37
|
RE: Scripting Problem Help Please
One solution would be to use a global variable to check with a script area collide callback if the player got into map 2(making the variable 1), then only set off the scare in map 1 if that global variable is 0
|
|
06-22-2012, 12:45 PM |
|
Mooserider
Member
Posts: 64
Threads: 11
Joined: Jan 2011
Reputation:
2
|
RE: Scripting Problem Help Please
I thought if you set up a callback - in this case probably using AddEntityCollideCallback - in the OnStart section it could only happen once due to the callback only being made the first time you enter the map. If you've set it up in OnEnter then every time you enter the map it will re-make that callback, therefore enabling it to repeat itself. If that's not the problem though FastHunter's solution would work.
|
|
06-23-2012, 05:51 AM |
|
|