Activate Script

Post » Thu Oct 15, 2009 8:44 pm

Original script:

Begin processusScript

if ( OnActivate == 0 )
return
endif

if ( GetJournalIndex "MV_DeadTaxman" < 10 )
Journal "MV_DeadTaxman" 10
AddTopic "murder of Processus Vitellius"
endif

Activate

End


My copied script:

Begin TarhielScript

if ( OnActivate == 0 )
return
endif

if ( GetJournalIndex "TQ_1" < 10 )
Journal "TQ_1" 10
AddTopic "Tarhiel"
endif

Activate

End


My question is, why won't my script work? I have the journal entry, I have the topic, but when I activate Tarhiel's body there's no journal update.

Edit: I checked to see if the topic was added to Seyda Neen, and it wasn't, so it probably isn't anything wrong with the journal but the actual activation.
User avatar
Lucy
 
Posts: 3362
Joined: Sun Sep 10, 2006 4:55 am

Post » Fri Oct 16, 2009 9:14 am

I think they wrote their script a bit oddly, but this should generally work:
Begin TarhielScriptif ( onactivate )    if ( GetJournalIndex "TQ_1" < 10 )        Journal "TQ_1" 10        AddTopic "Tarhiel"    endifendifActivateEnd


Make sure:
- the journal topic exists
- the topic exists and NPCs have something to say about it
- the journal index is in fact < 10 (try setting a variable to the index, then use a messagebox to check it)
User avatar
Dona BlackHeart
 
Posts: 3405
Joined: Fri Dec 22, 2006 4:05 pm

Post » Fri Oct 16, 2009 3:36 am

Actually, this:
Begin TarhielScriptif ( onactivate )    if ( GetJournalIndex "TQ_1" < 10 )        Journal "TQ_1" 10        AddTopic "Tarhiel";       MessageBox "Debug: Topic added"    ; <== easy way to find out    endif    Activate     ; <== Should be inside OnActivate, not outside.endifEnd

Other than that, recommendations to check the topic are sensible.
User avatar
Blackdrak
 
Posts: 3451
Joined: Thu May 17, 2007 11:40 pm

Post » Thu Oct 15, 2009 10:05 pm

Thanks for the help, people.

Edit: Yeah... So neither of these scripts works. I've got the topic assigned to the Seyda Neen cells, I've got the required journal entry, it just doesn't work. This doesn't have to do with the book's script, does it?

begin fallingScriptshort felloncefloat timerif ( "agronian guy"->OnDeath == 1 )	set fellonce to -1	returnendifif ( fellonce == -1 )	returnendifif ( fellonce == 2 )	set timer to ( timer + Getsecondspassed )	if ( timer >= 4 )			"player"->Say "Vo\w\m\Fle_WM005.mp3" "WAAAAAAAOOOOOOOOOOAAAAAAAAAGGGHHHHHH!!!!!"		"agronian guy"->Fall		set fellonce to -1	endifendifif ( fellonce == 0 )	if ( GetDistance Player <= 2000 )		"agronian guy"->enable		;"agronian guy"->AiWander 32 0 0 0 0 0 0 0 0 0 0 0		;PlayGroup WalkForward 1		"agronian guy"->Fall		set fellonce to 1	endifendifif ( fellonce == 1 )	set timer to ( timer + Getsecondspassed )	if ( timer >= 2 )			"fallguy_collision_unique"->Disable		;"agronian guy"->AiWander 32 0 0 0 0 0 0 0 0 0 0 0		;"agronian guy"->PlayGroup WalkForward 1		"agronian guy"->Fall		"player"->Say "Vo\w\m\Hit_WM006.mp3" "AAAAAAARRRRRRGGGGGGGGGGGGGGGGGGGG!!!!!!"		set fellonce to 2	endifendifendifend fallingScript

User avatar
Charlie Sarson
 
Posts: 3445
Joined: Thu May 17, 2007 12:38 pm

Post » Fri Oct 16, 2009 2:33 am

Did you also assigned the script to Tarhiel?

He already has a script but it's just the noLore script so it's not essential (might just want to add "short NoLore" to the beginning of your script just for the sake of it).
User avatar
Luna Lovegood
 
Posts: 3325
Joined: Thu Sep 14, 2006 6:45 pm

Post » Fri Oct 16, 2009 1:54 am

Did you also assigned the script to Tarhiel?

He already has a script but it's just the noLore script so it's not essential (might just want to add "short NoLore" to the beginning of your script just for the sake of it).


Yeah, I took off his other script and assigned this one.
User avatar
Marquis T
 
Posts: 3425
Joined: Fri Aug 31, 2007 4:39 pm

Post » Fri Oct 16, 2009 6:02 am

I apologize in advance, but the expression "topic assigned to the Seyda Neen cells" raises a suspicion that you did something that you don't really understand. Would you please select in CS "File->Export Data->Dialogue->New Dialogue", save the file, open it, and post all lines for the topic "Tarhiel".
User avatar
Spencey!
 
Posts: 3221
Joined: Thu Aug 17, 2006 12:18 am

Post » Thu Oct 15, 2009 11:52 pm

I apologize in advance, but the expression "topic assigned to the Seyda Neen cells" raises a suspicion that you did something that you don't really understand. Would you please select in CS "File->Export Data->Dialogue->New Dialogue", save the file, open it, and post all lines for the topic "Tarhiel".


Ok... Can you tell me what I did? I've never had to do that with dialogue before.

All I did was take three different topic options (they're all the same thing) and applied them to cells Seyda Neen, Arrille's Tradehouse, and the Census and Excise Office.
User avatar
Eddie Howe
 
Posts: 3448
Joined: Sat Jun 30, 2007 6:06 am

Post » Fri Oct 16, 2009 9:56 am

Ok... Can you tell me what I did?
That's exactly what I'm trying to find out.
User avatar
Elisabete Gaspar
 
Posts: 3558
Joined: Thu Aug 31, 2006 1:15 pm

Post » Fri Oct 16, 2009 4:28 am

Are you starting a new game, or using one with Fargoth already in it?

Slap this on him and test:
Begin TarhielScriptshort stateif ( onactivate )    MessageBox "Debug: I'm Fargoth!"    Set state To GetJournalIndex "TQ_1"    MessageBox "Debug: Journal %f", state    Activate     ; <== Should be inside onactivate, not outside.endifEnd


If that doesn't work, you probably have an old version of Fargoth in your save.
User avatar
Susan
 
Posts: 3536
Joined: Sun Jun 25, 2006 2:46 am

Post » Fri Oct 16, 2009 10:02 am

Starting a new game. And this has nothing to do with Fargoth. It's Tarhiel, the dude who falls from the sky.
User avatar
Laura-Jayne Lee
 
Posts: 3474
Joined: Sun Jul 02, 2006 4:35 pm

Post » Thu Oct 15, 2009 6:52 pm

Eh, they're both idiots. :P
Anyway, does that script do anything at all?
User avatar
David Chambers
 
Posts: 3333
Joined: Fri May 18, 2007 4:30 am

Post » Fri Oct 16, 2009 2:12 am

Eh, they're both idiots. :P
Anyway, does that script do anything at all?


You'll learn in my quest that Tarhiel isn't an idiot. He wouldn't have died if someone hadn't tampered with his scrolls.

That is... you would learn that if the script was working.

Nope, the script doesn't do anything.
User avatar
W E I R D
 
Posts: 3496
Joined: Tue Mar 20, 2007 10:08 am

Post » Fri Oct 16, 2009 12:15 am

Then something is wrong with your game. Are you sure your mod is activate? Is it loading? Is it saved properly? Are you getting any errors?

There's no reason that script shouldn't work, so... It's very likely something else.
User avatar
Rebecca Clare Smith
 
Posts: 3508
Joined: Fri Aug 04, 2006 4:13 pm

Post » Thu Oct 15, 2009 10:56 pm

No error messages, and yes, it's active, and as far as I know it's saved properly. Can anyone else test it and see if it works for him?
User avatar
Roanne Bardsley
 
Posts: 3414
Joined: Wed Nov 08, 2006 9:57 am

Post » Thu Oct 15, 2009 11:47 pm

If you use the script I posted earlier, uncomment the MessageBox command and see what happens. If the message is visible when you click on the body, the problem is within your dialogue. If it's not, the script for some strange reason doesn't work.

UPD: Try to replace "if ( onactivate )" with "if ( onactivate == 1 )"
User avatar
SHAWNNA-KAY
 
Posts: 3444
Joined: Mon Dec 18, 2006 1:22 pm


Return to III - Morrowind

cron