Is there a way to check whether a script is running or not

Post » Tue May 17, 2011 1:38 am

As the topic asks. Is there a way to check if a script is running or not? Via the console, I guess.
User avatar
FirDaus LOVe farhana
 
Posts: 3369
Joined: Thu Sep 13, 2007 3:42 am

Post » Tue May 17, 2011 9:49 am

As the topic asks. Is there a way to check if a script is running or not? Via the console, I guess.


The easiest way is to add several printc commands inbetween lines of code.

example:

printc "before if block"

if test == 0

printc "test is %.f" test

set test to 1

printc "test is %.f" test

endif

printc "after if block"


when you open the console, if your script is running you'll see


before if block
test is 0
test is 1
after if block
before if block
after if block
before if block
after if block
before if block
after if block
before if block
after if block
before if block
after if block
before if block
after if block
....


If you're just checking to see if just that particular script is running, this is not bad for a quick and dirty test.
If you plan on testing other stuff as well, add doOnce conditions to stop the spamming.
User avatar
Vickytoria Vasquez
 
Posts: 3456
Joined: Thu Aug 31, 2006 7:06 pm

Post » Tue May 17, 2011 3:38 am

Thanks. It looks like my script isn't running past a certain point. Check this out:

scn AttributeStayScriptShort IsLoadedfloat fQuestDelayTime Begin GameMode                    [i]<--------------if I add printc here, it will print to the console.[/i]	Set fQuestDelayTime to 1	Set GetGameLoaded to IsLoaded	if IsLoaded == 1	RunBatchScript "Strength.txt"		if player.GetBaseAV Strength < 10			player.SetAV Strength 252			RunBatchScript "Strength.txt"				if player.GetAV Strength < 10					player.SetAV Strength 252					RunBatchScript "Strength.txt"					[i]<--------------------------if I add printc here, it does not get printed to the console[/i]				endif		endif	endif		if player.GetAV Strength >= 252			player.SetAV Strength 252		endifendBegin MenuMode	RunBatchScript "Strength.txt"	if player.GetAV Strength >= 252		player.SetAV Strength 252	endif	if player.GetBaseAV Strength < 10		player.SetAV Strength 252	endif	if player.GetAV Strength < 10		player.SetAV Strength 252	endifend


So what's wrong, I wonder? Why isn't it running past a certain point? It is a quest script, attached to a quest. Is there something I can do to force it to run?
User avatar
LuCY sCoTT
 
Posts: 3410
Joined: Sun Feb 04, 2007 8:29 am

Post » Tue May 17, 2011 11:46 am

I put in a test dialogue box at several important places in my script, like "This means the first part is running", "This means second part is running" etc. Then you can see exactly where it stops.
User avatar
Flash
 
Posts: 3541
Joined: Fri Oct 13, 2006 3:24 pm

Post » Tue May 17, 2011 4:29 am

Set GetGameLoaded to IsLoaded

This should be Set isLoaded to GetGameLoaded.
If problems persist, post the contents of strength.txt.
User avatar
Jade MacSpade
 
Posts: 3432
Joined: Thu Jul 20, 2006 9:53 pm

Post » Tue May 17, 2011 10:27 am

The script still isn't running past a certain point. I don't know where it stops running. Here is the contents of my "Strength.txt":

player.setav strength 252


if I use the batch file console command, it works. Something else. Because of a bug with the CS, I had to make this ESP dependent on an ESM (OOO). How do I remove that dependency?
User avatar
Racheal Robertson
 
Posts: 3370
Joined: Thu Aug 16, 2007 6:03 pm

Post » Mon May 16, 2011 11:59 pm

You have an IF inside another IF and its impossible for the second 'printC' to display.

if player.GetBaseAV Strength < 10	player.SetAV Strength 252	RunBatchScript "Strength.txt"	if player.GetAV Strength < 10


If the base str is < 10, then you change the strength to 252.
Then, inside the same IF, you check if the strength is < 10 again, which how can it be since you just changed it to 252?

Seems to be working fine to me.
User avatar
Mimi BC
 
Posts: 3282
Joined: Sat Oct 07, 2006 10:30 pm

Post » Tue May 17, 2011 1:44 am

Okay, I just loaded the game for the fourth time and it has worked all four times. The only thing I did different is remove XP compatibility mode from the CS executable, made the suggested changes and saved again.

It's not perfect - whenever I level a skill it resets. But I can fix that, I think.

As asked a couple posts up, is it possible to remove the dependency on an ESM? It doesn't need the ESM.
User avatar
Lauren Denman
 
Posts: 3382
Joined: Fri Jun 16, 2006 10:29 am

Post » Tue May 17, 2011 2:39 am

Where is the "I am over-encumbered" setting stored? I'm trying to get rid of that message. I've scanned through the Game Settings, albeit not real well, but didn't see it.

EDIT:

Nevermind. Found it.
User avatar
James Baldwin
 
Posts: 3366
Joined: Tue Jun 05, 2007 11:11 am


Return to IV - Oblivion