Having a bit of trouble with a FOSE Script.

Post » Thu Mar 18, 2010 12:09 pm

scn H52StrengthReqBigGunsref CurrentEquippedBegin GamemodeSet CurrentEquipped to GetEquippedObject 5If GetWeaponSkill CurrentEquipped == 33 && GetBaseAV < 7	Player.UnequipItem CurrentEquipped 1 1	ShowMessage H52StrengthReqBigGunsMSGEndIfEnd


I figured that this would work, but it doesn't. It is a quest script by the way.

Any suggestions?
User avatar
Charleigh Anderson
 
Posts: 3398
Joined: Fri Feb 02, 2007 5:17 am

Post » Thu Mar 18, 2010 2:28 am

There are 2 mistakes:
- getBaseAV needs an actual actor value to query, strength in this case. Also you probably want to use getAV to get the current strength?
- Since it's a quest script, you have to specify the reference the functions are called on where it's necessary (player.getEquippedObject, player.getAV).

A fixed version:
scn H52StrengthReqBigGunsref currentEquippedBegin Gamemodeset currentEquipped to player.getEquippedObject 5if (getWeaponSkill currentEquipped) != 33	returnendifif (player.getAV Strength) >= 7	returnendifplayer.unequipItem currentEquipped 1 1ShowMessage H52StrengthReqBigGunsMSGEnd

User avatar
Tasha Clifford
 
Posts: 3295
Joined: Fri Jul 21, 2006 7:08 am

Post » Thu Mar 18, 2010 8:38 am

Ok, the first was really stupid of me, I do that all the time :lol: Didn't see it this time though.

Thanks for helping :) I understand it a lot better now.

I'm certain that I will get more errors when I make this script bigger though :lol:

Thanks again :)
User avatar
Yama Pi
 
Posts: 3384
Joined: Wed Apr 18, 2007 3:51 am


Return to Fallout 3