Jump to content


Area script not running


  • Please log in to reply
12 replies to this topic

#1 -Silmarien-

-Silmarien-
  • Guest

Posted 08 September 2004 - 04:35 PM

I assigned a script to an area that originally doesn't have a script (AR0527, house in the Bridge District). The relevant parts of my .tp2 look like this:

EXTEND_TOP ~ar0527.bcs~ ~Scripts\E3AR0527.baf~

COPY_EXISTING ~ ar0527.are~ ~override\ar0527.are~
WRITE_ASCII ~0x94~ ~AR0527~

E3AR0527.baf is a creature creation script:

IF
Global("CREATUREEXISTS","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("CREATUREEXISTS","GLOBAL",1)
CreateCreature("CREATURE",[374.353],14)
END

The script does get assigned properly--I checked with NI. The problem is, when I enter the area, it just doesn't run. The game just sort of freezes a bit and then continues. The creature doesn't get created, and the variable doesn't get set, either.

Could somebody help please? Really at my wits' end!

#2 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 08 September 2004 - 04:51 PM

Three things pop into mind.
1) That your area's script is being overwridden by the main BridgeDistrict script. Try adding your new area to the MastArea.2da file to remedy this.
2) That your global is already used somewhere else in the game, thus mussing things up. (Use a prefix to help prevent these things. It's why we started using 'em. ;) )
3) Your cre has a problem. Have you tried consoling the cre in?

The great wolf Fenrir gapes ever at the dwelling of the gods.


#3 -Silmarien-

-Silmarien-
  • Guest

Posted 08 September 2004 - 09:10 PM

Thanks for the prompt response. Nothing's wrong with the .cre, I CLUAed it in to check. Don't think there's anything wrong with the variable either--I do have a prefix, and when I did a GetGlobal it returned variable does not exist.

I'll check the Bridge District script to see if it does anything. If I get really desperate I'll just spawn the creature in somewhere and get it to EscapeAreaMove(), think that would work?

Thanks, again.

#4 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 09 September 2004 - 08:21 PM

Find the problem, you shouldn't need a work-around for something this easy. (It'll give you a buggy mod if you're not careful.) Have you tried #1?

The great wolf Fenrir gapes ever at the dwelling of the gods.


#5 Idobek

Idobek

    Pocket Plane Gibberling

  • Member
  • 429 posts

Posted 10 September 2004 - 03:49 AM

Have you already visited the area? If the area is stored in a save game the the new script won't take effect.

#6 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 10 September 2004 - 09:04 PM

Have you already visited the area? If the area is stored in a save game the the new script won't take effect.

True enough. Just to clarify though, it's not having been in an area previously that prevents the script from running it's changes, but the fact that the original area never got the script assignment update.

The great wolf Fenrir gapes ever at the dwelling of the gods.


#7 Topaz

Topaz
  • Member
  • 24 posts

Posted 13 September 2004 - 02:17 AM

Have you already visited the area? If the area is stored in a save game the the new script won't take effect.


Except if it's written in mastarea.ids? (question)

#8 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 13 September 2004 - 09:51 AM

An area script will ALWAYS update when you load a new game whether you run a new game or not. In this particular case, it's a matter of whether the area itself has had the script ASSIGNED to it. That factor is saved in the savegame. It has nothing to do with the MastArea.2da.

The great wolf Fenrir gapes ever at the dwelling of the gods.


#9 -Silmarien-

-Silmarien-
  • Guest

Posted 13 September 2004 - 04:34 PM

Just checked. Yes, I have visited the place before it seems. I'll find another savegame where I haven't visited and see what it does. Thanks again, guys.

#10 Avenger_teambg

Avenger_teambg
  • Member
  • 604 posts

Posted 14 September 2004 - 09:34 AM

Is there a big demand for a tool which is able to remove an area from a saved game?
Avenger

#11 -Silmarien-

-Silmarien-
  • Guest

Posted 15 September 2004 - 04:54 PM

Yes, the problem was because I'd visited the area before. Everything's now running fine, and I learned something I didn't know before. Thanks!

#12 Yovaneth

Yovaneth

    The newly-appointed Master Builder of Baldur's Gate

  • Modder
  • 3058 posts

Posted 18 September 2004 - 12:10 PM

I can see how such a tool would be very useful for mod testing.....

-Y-

#13 Caswallon

Caswallon

    Telvanni Archmagister

  • Member
  • 284 posts

Posted 24 September 2004 - 04:26 PM

NI should be able to do this...