Another creature spawning problem
#1
Posted 06 December 2004 - 10:22 AM
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],
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
Posted 06 December 2004 - 01:12 PM
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.
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#3
Posted 06 December 2004 - 01:25 PM
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
Posted 06 December 2004 - 01:31 PM
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
Posted 06 December 2004 - 01:46 PM
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
Posted 06 December 2004 - 01:52 PM
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#7
Posted 06 December 2004 - 01:59 PM
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],
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
Posted 08 December 2004 - 10:19 AM
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.