Chunk of quest script not working...

Post » Sat May 28, 2011 5:25 pm

I am using a quest script to control when certain stages advance. It is run by certain custom ghouls dying, and when they die they increase a variable in the script, once it gets so high (aka they all are dead) the script does things. Here is the script with unimportant stuff cut out, represented by a row of asterisks.

scn PGMQ2SCRIPT*****************short GroupIsArmedshort GhoulDefeatedshort DoOnceBegin GameMode*******************	If GetStage PGMQ2 == 61		If GhoulDefeated == 6			Setstage PGMQ2 62			PGMQPalmerRef.Say PGMQ2PalmerGhoulAmbush2		EndIf	EndIf	If GetStage PGMQ2 == 72		*******************		If GhoulDefeated == 12			SetStage PGMQ2 73		EndIf	EndIfEnd


Now the idea here, is that once you kill 6 of them, it advances the stage. Then later on, you are attacked by 6 more ghouls, so when they die it should advance the stage again... However, it does not. All 6 ghouls die, but no queststage advance occurs. The first time, where its moving it from 61 to 62 works just fine, but the stage never moves from 72 to 73. Am I missing something crucial here? I have made sure I made the quest stages and the quest is on stage 72 when the ghoul killing occurs. I hope I have just looked over something that is stopping this from occuring, as I do not know why it as at all. D: I have been scripting alot of the day, so my brain is a little fried. Any help is greatly appreciated!

Gunmaster95
User avatar
Crystal Clear
 
Posts: 3552
Joined: Wed Aug 09, 2006 4:42 am

Post » Sat May 28, 2011 5:50 pm

	If GetStage PGMQ2 == 72		*******************		If GhoulDefeated == 12			SetStage PGMQ2 73		EndIf	EndIf


the stage never moves from 72 to 73. Am I missing something crucial here?

I would say its the '*******************' part of the script thats not working then.

Also, do you ever reset the GhoulDefeated variable back to zero or anything? Make sure its actually at '12' and exactly '12'. Any other number will not work.
User avatar
Kristian Perez
 
Posts: 3365
Joined: Thu Aug 23, 2007 3:03 am

Post » Sat May 28, 2011 10:03 am

I would say its the '*******************' part of the script thats not working then.

Also, do you ever reset the GhoulDefeated variable back to zero or anything?

That better have been a joke. :P

And no I do not. I never touch the GhoulDefeated variable, except to set it 1 higher, each time a ghoul dies. Perhaps theres something else in my quest script corrupting it.

Here is the script on the Ghoul, which raises the variable when they die.

scn PGMQ2GhoulAmbusherSCRIPTBegin OnDeath	Set PGMQ2.GhoulDefeated to (PGMQ2.GhoulDefeated + 1)End


And here is the entire quest script. Nothing cut out at all, incase something else is somehow messing it up?

scn PGMQ2SCRIPTfloat PCTimeOfDayfloat Body1Zfloat Body2Zshort GroupIsArmedshort GhoulDefeatedshort DoOnceBegin GameMode	If GetStage PGMQ2 == 59		If GroupIsArmed == 4			SetStage PGMQ2 60		EndIf	EndIf	If GetStage PGMQ2 == 61		If GhoulDefeated == 6			Setstage PGMQ2 62			PGMQPalmerRef.Say PGMQ2PalmerGhoulAmbush2		EndIf	EndIf	If GetStage PGMQ2 == 72		If DoOnce == 0			Set DoOnce to 1			PGMQAssistant1Ref.Disable			PGMQAssistant2Ref.Disable			PGMQ2CryoGhoulAttackRef.Enable			Set Body1Z to (PGMQLA1DEAD.Getpos Z - 1000)			PGMQLA1DEAD.Setpos Z Body1Z			Set Body2Z to (PGMQLA2DEAD.Getpos Z - 1000)			PGMQLA2DEAD.Setpos Z Body2Z		EndIf		If GhoulDefeated == 12			SetStage PGMQ2 73		EndIf	EndIfEnd

User avatar
Catharine Krupinski
 
Posts: 3377
Joined: Sun Aug 12, 2007 3:39 pm

Post » Sat May 28, 2011 12:22 pm

No joke since I did not know what that part of the script did. I figured it was another condition.

Have you verified that when PGMQ2 == 72 that GhoulDefeated == 12?

I would put a message on the ghoul death that displays the count (after the addition) when a ghoul dies.
User avatar
Thomas LEON
 
Posts: 3420
Joined: Mon Nov 26, 2007 8:01 am

Post » Sat May 28, 2011 9:33 am

Where is the actual
Setstage PGMQ2 72 
command?
User avatar
Jamie Moysey
 
Posts: 3452
Joined: Sun May 13, 2007 6:31 am

Post » Sat May 28, 2011 6:57 am

The Setstage PGMQ2 72 command is on the end of a line of speech that occurs earlier, prior to your arrival in this cell. The stage is actually 72. That was the first thing I did to debug.

I can never get the commands to work in the console. How would I check the GhoulDefeated variable ingame? I'm not sure exactly how to type it in.
User avatar
SiLa
 
Posts: 3447
Joined: Tue Jun 13, 2006 7:52 am

Post » Sat May 28, 2011 11:01 am

The Setstage PGMQ2 72 command is on the end of a line of speech that occurs earlier, prior to your arrival in this cell. The stage is actually 72. That was the first thing I did to debug.

I can never get the commands to work in the console. How would I check the GhoulDefeated variable ingame? I'm not sure exactly how to type it in.


At the console

show PGMQ2.GhoulDefeated

User avatar
Alba Casas
 
Posts: 3478
Joined: Tue Dec 12, 2006 2:31 pm

Post » Sat May 28, 2011 5:48 pm

Ok for some reason it starts as 0, but does go up by 6 like it should. I believe the issue here, is entirely my fault. I HAD it where it set it to 0, then did other crazy stuff, then played that part. Saved, and changed it to not set it to 0, foolishly forgetting it would already be so. So if I were to play back from the first ghoul killin, it would remain 6, and go up to 12. I will simply use console to advance the quest stage. Twas the dirty save at fault here. :( Sorry about that. Thanks for helping me figure it out you two! :celebration:

Gunmaster95

Edit: Setting the variable to 12 manually resulted in things going as they should have. A dirty save and forgetful mind was at fault here. :P Thanks again.
User avatar
Heather Dawson
 
Posts: 3348
Joined: Sun Oct 15, 2006 4:14 pm


Return to Fallout 3