Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting Problem Help Please
HoyChampoy Offline
Junior Member

Posts: 43
Threads: 16
Joined: Jun 2012
Reputation: 0
#1
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
Find
MaZiCUT Offline
Senior Member

Posts: 536
Threads: 31
Joined: Jun 2012
Reputation: 17
#2
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
Website Find
HoyChampoy Offline
Junior Member

Posts: 43
Threads: 16
Joined: Jun 2012
Reputation: 0
#3
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 Sad
06-22-2012, 09:58 AM
Find
Traggey Offline
is mildly amused

Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation: 185
#4
RE: Scripting Problem Help Please

Wrong forum, moved.
06-22-2012, 11:33 AM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#5
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
Find
Mooserider Offline
Member

Posts: 64
Threads: 11
Joined: Jan 2011
Reputation: 2
#6
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.

Working on a FC: "Don't Let Go "
06-23-2012, 05:51 AM
Find




Users browsing this thread: 1 Guest(s)