Scripted Teleport Doesn't work.

Post » Tue Jun 28, 2011 8:37 am

In my mod, the npc is teleported, but when the place goes into the cell, is disabled until the player sleeps.
This is in the resultbox of the dialogue: ""stc_mathusdawn"->PositionCell, 105, 256, -80, 0 "Seyda Neen, Lighthouse""

This script is in the lighthouse:
begin stc_lighthouseenablerQHshort GetDoneif ( stc_templeofsharV == 4 )	if ( GetDone == 0 )		if ( GetPCSleep == 1 )				"stc_mathusdawn"->enable				Set GetDone to 1		else				"Stc_mathusdawn"->disable		endif	else		return	endifelseif ( stc_templeofsharV == 5 )	"stc_mathusdawn"->StartCombat, "player"		if ( "stc_mathusdawn" GetHealth <= 1 )			"player"->additem "stc_mathusdawnnoteHQ" 1			Messagebox, "After you kill Mathus, you feel as though the bad things that have happened throughout your life are amplified, worsened. Almost immediatly, the feeling goes away. His regrets and losses have been offered, and his note has been taken."			set stc_templeofsharV to 6			Journal, "stc_templeofshar" 50			return		else			return		endifendif

It seems that he's either not there or isn't being enabled. I tried enabling him via console but he didn't show, so i'm at a loss as to why it's not working.
Any ideas?
User avatar
Jack Walker
 
Posts: 3457
Joined: Wed Jun 06, 2007 6:25 pm

Post » Tue Jun 28, 2011 6:46 pm

I would say the first debugging step I would take is removing the enable/disable portion just to see if he teleports....

When you aren't sure which part is failing, remove everything else and try things out one a time until you find the break point.
User avatar
Stacy Hope
 
Posts: 3391
Joined: Thu Jun 22, 2006 6:23 am

Post » Tue Jun 28, 2011 7:18 pm

I would say the first debugging step I would take is removing the enable/disable portion just to see if he teleports....

When you aren't sure which part is failing, remove everything else and try things out one a time until you find the break point.

The teleport works, so it must be within the script itself, although I don't see anything wrong with it.
User avatar
quinnnn
 
Posts: 3503
Joined: Sat Mar 03, 2007 1:11 pm

Post » Tue Jun 28, 2011 3:06 pm

So what changes have you made to the script for debugging? Have you used MessageBox to find out what parts are being run, and what variables are being set and when?
User avatar
Esther Fernandez
 
Posts: 3415
Joined: Wed Sep 27, 2006 11:52 am


Return to III - Morrowind