Jump to content


Photo

Another creature spawning problem


  • Please log in to reply
7 replies to this topic

#1 Blitz

Blitz

    Tabby Master

  • Member
  • 337 posts

Posted 06 December 2004 - 10:22 AM

I seem to be having trouble creating creatures in the player's thief guild stronghold (AR0302).

It works using CLUA Console...but scripting doesn't work. I thought it might be a minor scripting error. Here's B#AR0302, the area script. And yes, i've tried using both EXTEND_TOP and EXTEND_BOTTOM in the .tp2 file.

IF
Global("B#StartQ","GLOBAL",1)
Global("B#Guild","GLOBAL",0)
Global("B#SpawnL","GLOBAL",0)
THEN
RESPONSE #100
ActionOverride("SHTHLT02",EscapeAreaDestroy(0))  
CreateCreature("b#lathen",[574.290],3)
SetGlobal("B#SpawnL","GLOBAL",1)
END

IF
GlobalTimerExpired("LTimerA","LOCALS")
THEN
RESPONSE #100
CreateCreature("b#lathen",[574.290],8)
END

Not only does the old Lathan not vanish, the new one isn't created unless I use CLUA. Also, when the timer expires, the new Lathan doesn't reapear (used for a new quest/event I added).

Did I simply make some simple, n00bish mistake, or is there something about AR0302 i'm just not aware of? I even checked the script using DLTCEP, and it said it appeared correct. Augh!

#2 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 06 December 2004 - 01:12 PM

Some of the areas in the game doesn't have a specific script assigned to it. AR0302 is one of those cases.

This is how you do (in the tp2):

COPY_EXISTING ~AR0302.are~ ~override~
WRITE_ASCII 0x94 ~AR0302~
EXTEND_TOP ~Ar0302.bcs~ ~dir/[your scriptname].baf~

Also, throw in a :

ALLOW_MISSING ~Ar0302.bcs~

at the top, right after BACKUP, AUTHOR and so forth, but before the BEGIN. This is to prevent WeiDU from giving you a harmless, but irritating, error-message.

Now, there are a few possible problems with this type of scriping. If you have as savegame where you have been in the area, and then install this mod, the samegame will have stored the information that the area doesn't have a script. If you use a new game, or use a savegame where you haven't been in the area before, it's no problem.

There is a way to solve this possible issue, but those are a little bit more complicated. I could explain it to you if you wish.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#3 Blitz

Blitz

    Tabby Master

  • Member
  • 337 posts

Posted 06 December 2004 - 01:25 PM

Thanks, SConrad!

Not only have you solved my problem, but you've also shown me that for once...it wasn't my fault! Yes!

*Bows before SConrad

Now, if only I could solve that annoying problem where the game scrolls the viewpoint to the top of the screen, and I can't view my character. If I select him, it'll center on the lil' dude, and then the viewpoint scrolls back up again.

Fudge. What did I do this time?

Edited by Blitz, 06 December 2004 - 01:25 PM.


#4 Blitz

Blitz

    Tabby Master

  • Member
  • 337 posts

Posted 06 December 2004 - 01:31 PM

DANG! It was my fault. AR0322 was the area I wanted. AR0302 was Mae'Var's Guildhall! Apparently the game has seperate areas for each version of the guild.

I'm assuming I still need to add that little bit of script for this area as well, eh?

P.S.

After screaming at my CPU, the scroll-bug died off for no reason whatsoever.

*cough* buy new CPU *cough*

Edited by Blitz, 06 December 2004 - 01:34 PM.


#5 Blitz

Blitz

    Tabby Master

  • Member
  • 337 posts

Posted 06 December 2004 - 01:46 PM

UPDATE:

It removes the old version of Lathan now, but it still won't freakin' create the new one.

Hmm...is there anything else I need to do?

I can create him using the CLUAConsole, so I know I have the right name down.

Edited by Blitz, 06 December 2004 - 01:46 PM.


#6 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 06 December 2004 - 01:52 PM

You don't have to go through the same procedure with AR0322, that one already has a script.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#7 Blitz

Blitz

    Tabby Master

  • Member
  • 337 posts

Posted 06 December 2004 - 01:59 PM

One more quick question!
Okay, I got the old one to disapear and the new Lathan to appear, but after you tell him what to do, and he disappears, he doesn't come back after a day like he should.

Judging by my first post, how come after a day, why Lathan doesn't reappear?

In Area Script:

IF
GlobalTimerExpired("LTimerA","LOCALS")
THEN
RESPONSE #100
CreateCreature("b#lathen",[574.290],8)
END

The timer should expire after a day, shouldn't it?

And I checked Lathan's .d file. Here's where I set the timer (only some surronding code shown). It compiles without error.

DO ~SetGlobalTimer("LTimerA","GLOBAL",ONE_DAY)
EscapeArea()
SetGlobal("B#Guild","GLOBAL",1)
SetGlobal("B#OutcomeA","GLOBAL",4) ~ EXIT

Edited by Blitz, 06 December 2004 - 02:37 PM.


#8 Vlasák

Vlasák
  • Member
  • 51 posts

Posted 08 December 2004 - 10:19 AM

You have a mistake in the block:

IF
GlobalTimerExpired("LTimerA","LOCALS")
THEN
RESPONSE #100
CreateCreature("b#lathen",[574.290],8)
END

- timer is checked as LOCALS and it should be GLOBAL (you have set it as GLOBAL as well as it *should* be GLOBAL due to the fact that the areas cannot have LOCALS variables/timers)

BTW you should add in this block the variable check to prevent of infinite creating of the creature; look, your current trigger is true all the time when the timer is expired. You should to set it as false when you create the creature.

IF
GlobalTimerExpired("LTimerA","LOCALS")
Global("b#lathenCreated","GLOBAL,0)
THEN
RESPONSE #100
CreateCreature("b#lathen",[574.290],8)
SetGlobal("b#lathenCreated","GLOBAL,1)
END

Edited by Vlasák, 08 December 2004 - 10:20 AM.

Baldur's Gate II add-on CZ - TC from Dalelands
http://addoncz.gamestar.cz

English forums are opened!