Script problem when assigned to a safe

Post » Sat Nov 06, 2010 4:54 pm

Hi

I am making a quest to go with the RR Companions Vault mod, where instead of the vault automatically being the players he/she has to go to the actual owner then get the password.

All is running fine except I have put the password into a Safe which is only openable with the correct key (to stop people getting the password before running the Quest)

I have added the script to the safe for when its activated to move the Quest to the next stage, that works fine but the safe won't open. As the quest stage has moved the quest can be completed but I'd like for the safe to open so the player takes the password for realism's sake. I've had this before when I've added a script to a safe but got round it then by putting the item somewhere else.

This is the script I added to the safe

"scn v1Vault1AccessSafeScript

BEGIN onActivate

if getStage v1vault1quest == 30
setStage v1vault1quest 40
endif

END"

Is there something else I need to allow the safe to open? The safe opens fine with no script attached , I suppose I could add a trigger spot instead but is there a way of making the safe open?
User avatar
Heather Dawson
 
Posts: 3348
Joined: Sun Oct 15, 2006 4:14 pm

Post » Sat Nov 06, 2010 6:45 pm

Try this, or something like it, this is straight outta my head so I am not sure on all the usages.

BEGIN onActivate   if getStage v1vault1quest == 30      setStage v1vault1quest 40      activate   elseif getStagedone v1vault1quest 30 == 1       activate     else       showmessage MyHappyErrorMessage   endifEND


you have to make MyHappyErrorMessage if you want one.
User avatar
Nick Tyler
 
Posts: 3437
Joined: Thu Aug 30, 2007 8:57 am

Post » Sat Nov 06, 2010 10:45 pm

Try this, or something like it, this is straight outta my head so I am not sure on all the usages.

BEGIN onActivate   if getStage v1vault1quest == 30      setStage v1vault1quest 40      activate   elseif getStagedone v1vault1quest 30 == 1       activate     else       showmessage MyHappyErrorMessage   endifEND


you have to make MyHappyErrorMessage if you want one.


Cheers Tarrant

It's exactly what I was doing before on another mod, I wasn't telling the script to activate the safe! I always forget that you need to tell the game to activate an object even though its in a Begin OnActivate block!

I'll try it now, I'm sure it will work
User avatar
louise fortin
 
Posts: 3327
Joined: Wed Apr 04, 2007 4:51 am

Post » Sat Nov 06, 2010 10:10 pm

Its because when you 'code' an OnActivate block, it takes the place of 'normal activation'.
To force the 'normal' activation, you have to call 'Activate' on the object within the OnActivate block.
User avatar
RaeAnne
 
Posts: 3427
Joined: Sat Jun 24, 2006 6:40 pm

Post » Sat Nov 06, 2010 6:35 pm

Its because when you 'code' an OnActivate block, it takes the place of 'normal activation'.
To force the 'normal' activation, you have to call 'Activate' on the object within the OnActivate block.


Hi , yeah it worked a treat thanks.

All I need now is to find a way of making the mod work with a current save, basically if the player has already visited Vault 1 the main door is already open. It works fine with a new save but it would be nice if the Vault 1 door could be "re-set" so its locked for people who install this mod. Then again I suppose it wouldn't make alot of sense if they player had already been in the vault for it to be suddenly locked again!
User avatar
Nomee
 
Posts: 3382
Joined: Thu May 24, 2007 5:18 pm


Return to Fallout 3