Author Topic: Wrong area script triggering  (Read 1078 times)

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Wrong area script triggering
« on: April 20, 2006, 04:41:24 PM »
I'm having a little problem in that an area script is triggering while no one is in the area.

Natula, the fanatic seargent from the "imprison Lord Agrim" piece of the planar sphere stronghold appears when he is supposed to, says his little piece, walks off, and then all of the sudden a cutscene from ar0411 (planar sphere) triggers, even though I'm in the slums.

The cutscene is supposed to trigger the next time you enter the Sphere after you talk to Natula. At the end of his dialog a global is set. But instead, RIGHT after the dialog, I get a sudden, fogged view of the ar0411 (since no one is in it I can't see anything), the dialog triggers, my characters are moved to the coordinates, and the enemies spawn.

But my characters are still in the slums, and they are moved to the coordinates in the slums instead of ar0411. Once the cutscene is over, it switches back to my characters in the slums, and if I enter the Sphere, all the enemies are there spawned, and you can continue the quest as normal.

I searched all of the dialog/baf's/snippets that are installed with the mod (PSMod, which is what I'm testing), and the variables don't appear. At all. There is no reference to mgass01 (natula) anywhere, and the only changes to ar0411.bcs are a few IF blocks that only reference PSMod variables (all of which start with the letters ps, so there isn't any cross-over). The only difference appears to be that the IF block that spawns the encounter is now further down in the script. And the slums script only has one tiny modification to it that doesn't pertain in anyway to this.

How is this even possible? Area scripts from other areas can't trigger when you aren't there. Or at least they shouldn't be able to!
There aren't any observers spawned previously, the only thing that is still in the sphere is the Golem, and it's not a party member.

I extracted and converted Natula's dialog with weidu both with the mod installed and without, they are the same, so its not that.

The only thing I can think of is that the game thinks I still have.... something? in the sphere, but I don't, the intial part of the mage stronghold quest isn't even touched by the mod. Nothing is changed until aftere the mage stronghold is all done. Er. Well, six scrolls are created in containers, but that is it.

Help. Please. ???
« Last Edit: April 20, 2006, 04:48:24 PM by Duality »
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline SimDing0

  • Back In Black
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3496
  • Gender: Male
  • Word Enhancer
Re: Wrong area script triggering
« Reply #1 on: April 20, 2006, 06:29:35 PM »
Scripts from other areas do persist under certain circumstances (I forget exactly when, but if you teleport or CLUA between areas problems like this often show up). I wouldn't have thought it would happen in this situation, since the slums are a master area, but again, I've largely forgotten how it all works. Adding AreaCheckObject or InMyArea checks to script blocks will provide a safe solution that's bound to catch the problem, regardless of what's causing it.

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: Wrong area script triggering
« Reply #2 on: April 20, 2006, 07:03:55 PM »
I had originally thought it stemmed from over-use of the MoveToArea clua command, but it occured even when I never used MoveToArea. I'll try the area check though.

EDIT:
Crap. Grade A Crap.
Same thing happened again, but with a different encounter. An apprentice is supposed to show up in the Sphere and start a cutscene. Well, he showed up in the Government district. And I had forgotten about another encounter that did the same, but it occured in a sub area of the Sphere (ar0412), so I wasn't sure if that was the problem.

So now it's not just that one encounter, but something weird is going on. And I have no clue as to what it is.
« Last Edit: April 20, 2006, 11:38:59 PM by Duality »
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Avenger_teambg

  • Planewalker
  • *****
  • Posts: 399
Re: Wrong area script triggering
« Reply #3 on: April 22, 2006, 04:36:26 AM »
Scripts from other areas do persist under certain circumstances (I forget exactly when, but if you teleport or CLUA between areas problems like this often show up). I wouldn't have thought it would happen in this situation, since the slums are a master area, but again, I've largely forgotten how it all works. Adding AreaCheckObject or InMyArea checks to script blocks will provide a safe solution that's bound to catch the problem, regardless of what's causing it.
I think it is about areas listed in mastarea.2da, if the planar sphere was made into a master area it could keep its scripts running.
But take care, removing areas from the mastarea.2da can cause crash (if the saved game contains the removed area as master area).

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: Wrong area script triggering
« Reply #4 on: April 22, 2006, 12:19:04 PM »
You were right SimDing0, the AreaCheckObject seems to have fixed the problem. *phew*  ;D
It was getting very frustrating to have random events from the Sphere triggering all over the city.

I think I'll leave mastarea.2da alone, while it annoys me not to fix the problem at it's cause, messing with something that can cause game crashes unnerves me; my game crashes enough as it is.

But even if something is a master area, when you switch to another area that is also a master area, shouldn't the first area's scripts stop running? Otherwise, wouldn't you have total chaos as scripts from all the previous areas you were in are triggering no matter where you are?

I wish I knew what piece of the mod was causing this, since there doesn't seem to by any obvious culprit....
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Avenger_teambg

  • Planewalker
  • *****
  • Posts: 399
Re: Wrong area script triggering
« Reply #5 on: April 23, 2006, 05:28:11 AM »
Try pressing ctrl-g to see which areas are loaded, it may help.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: