GameMode block won't run

Post » Fri Jan 07, 2011 7:37 pm

Straight to the point: this script won't run
scn RaestlozCustomIconScriptshort doOncebegin GameMode;if (GetGameLoaded)   ; if (IsPluginInstalled "CustomSpellIcons.dll")       ; if doOnce == 0            set doOnce to 1            player.addspell RaestlozSnowflowerMode            SetSpellIcon RaestlozSnowflowerMode "Raestloz Merger\Magics\snowflower_mode.dds"      ; endif   ; endif;endifend


I'm literally desperate here, for the life of me I can't see why this script won't run. It is marked as Quest script, not object, not magic effect. Also, i tried to disable the checks and it still won't run.

CustomSpellIcons.dll is installed, because CS recognized it (and refused to compile when I, say, changed "setspellicon" command to "setspellco")

the plug-in itself works, because I load a save with my character still wearing an armor from that very plug-in; it's just that this particular code won't run

Any kind of enlightenment is very appreciated
User avatar
Isaac Saetern
 
Posts: 3432
Joined: Mon Jun 25, 2007 6:46 pm

Post » Fri Jan 07, 2011 10:01 pm

By "not run" you mean it doesn't start? Shouldn't you use the fQuestDelayTime var if that's a quest script? Have you checked the box near "start game enabled" in the quest editor page? I never used SetSpellIcon function so I don't know. Why are you commenting all the if conditions? It looks like that script will run forever continuously adding a spell to player. Try un-commenting the "if doOnce == 0" and its endif:

ScriptName RaestlozCustomIconScriptfloat fQuestDelayTimeshort doOnceBegin GameMode;if (GetGameLoaded)   ; if (IsPluginInstalled "CustomSpellIcons.dll")        if ( doOnce == 0 )Messagebox "Script has started."            player.addspell RaestlozSnowflowerMode            SetSpellIcon RaestlozSnowflowerMode "Raestloz Merger\Magics\snowflower_mode.dds"            set doOnce to 1       endif   ; endif;endifEnd

User avatar
Johnny
 
Posts: 3390
Joined: Fri Jul 06, 2007 11:32 am

Post » Fri Jan 07, 2011 12:26 pm

By "not run" you mean it doesn't start? Shouldn't you use the fQuestDelayTime var if that's a quest script? Have you checked the box near "start game enabled" in the quest editor page? I never used SetSpellIcon function so I don't know. Why are you commenting all the if conditions? It looks like that script will run forever continuously adding a spell to player. Try un-commenting the "if doOnce == 0" and its endif:

Because I thought it might have something to do with the script running or not, I'll try to set the fquestdelaytime, but shouldn't it be 5 secs on default? And I'm certain I've let the game on for 5 seconds on one run
User avatar
m Gardner
 
Posts: 3510
Joined: Sun Jun 03, 2007 8:08 pm

Post » Fri Jan 07, 2011 11:40 pm

Maybe a silly question, but did you put the script on a quest? And did you make sure that the quest is 'start game enabled'? Quest scripts don't run on their own, they need to be attached to a quest.

I'm literally desperate here, for the life of me I can't see why this script won't run. It is marked as Quest script, not object, not magic effect. Also, i tried to disable the checks and it still won't run.

User avatar
Skivs
 
Posts: 3550
Joined: Sat Dec 01, 2007 10:06 pm

Post » Fri Jan 07, 2011 1:30 pm

Maybe a silly question, but did you put the script on a quest? And did you make sure that the quest is 'start game enabled'? Quest scripts don't run on their own, they need to be attached to a quest.

:facepalm: Shiiiite, so that's why! I thought Quest scripts run on their own!

EDIT: Working now, thanks phitt! I swear... I won't make the same mistake again
User avatar
Alexandra walker
 
Posts: 3441
Joined: Wed Sep 13, 2006 2:50 am


Return to IV - Oblivion