Jump to content

Recommended Posts

​I have been trying to implement visual effects to accompany a glasses mod that I have been working off of (Just a personal project) and have come to a point were I can't discern what is going wrong and most tutorials are of no use. One can of course do more investigatory work, but I thought I'd give the forums a shot.

scn 000NearFarSCRIPT

Begin GameMode

; NEARSIGHT - Blurred BG
if (player.hasperk NearSight == 1) && (player.getequipped GlassesBlackrimmed == 1)

RemoveImageSpaceModifier 000NEARsight

elseif (player.hasperk NearSight == 1) && (player.getequipped GlassesBlackrimmed == 0)

ApplyImageSpaceModifier 000NEARsight

; FARSIGHT - Blurred FG
elseif(player.hasperk FarSight == 1) && (player.getequipped GlassesReading == 1)

RemoveImageSpaceModifier 000FARsight

elseif (player.hasperk FarSight == 1) && (player.getequipped GlassesReading == 0)

ApplyImageSpaceModifier 000FARsight

; BIFOCAL - Full screen blur, replaced depending on equipped glasses
elseif (player.hasperk BifocalSight == 1) && (player.getequipped GlassesReading == 0) && (player.getequipped GlassesBlackrimmed == 0)

ApplyImageSpaceModifier 000BIFOCALsight

elseif (player.hasperk BifocalSight == 1) && (player.getequipped GlassesReading == 1) && (player.getequipped GlassesBlackrimmed == 0)

RemoveImageSpaceModifier 000BIFOCALsight
RemoveImageSpaceModifier 000FARsight
ApplyImageSpaceModifier 000NEARsight

elseif (player.hasperk BifocalSight==1) && (player.getequipped GlassesReading == 0) && (player.getequipped GlassesBlackrimmed == 1)

RemoveImageSpaceModifier 000BIFOCALsight
RemoveImageSpaceModifier 000NEARsight
ApplyImageSpaceModifier 000FARsight

endif
End

As can be deduced, the ImagSpaceModifiers are the 000NEARsight (etc.) and I am attempting to test for some standard game items. It would also be nice if there was an easy method to test for multiple items. Would one just use an 'or' operator, and how would one do that? I have not made the ImageSpaceModifiers yet, would that cause the script to fail? Essentially, the script refuses to save meaning there is an error in it. Any help appreciated.

Link to comment
Share on other sites

Yes, you need the image space modifiers created. Secondly, in order to bypass using too much ||'s, create a form list populated with, say, glasses and check that list when using GetEquipped. For example: player.GetEquipped CoolShadesFORMLIST. If the equipped glasses are in the list, the script will receive 'true' and process accordingly.

You should consider using IsImageSpaceActive condition in order to limit activating and deactivating image space modifiers to only when they're off and on respectively. Not sure if this one matters that much, but still, keep it in mind.

Lastly, If these perks are mutually exclusive, and I suspect they are, you could ease the processing by splitting this quest and its script into 3. Have them disabled on start, and once a perk is selected by the player you simply activate its associated quest with a well-placed StartQuest.

 

Here's how the chopped up bits would look (IsImageSpaceActive check not included):

 

scn 000SightNearSCRIPT

Begin GameMode

    if ( player.getequipped GlassesBlackrimmed )
        rimod 000NEARsight
    else
        imod 000NEARsight
    endif

End
scn 000SightFarSCRIPT

Begin GameMode

    if ( player.getequipped GlassesReading )
        rimod 000FARsight
    else
        imod 000FARsight
    endif

End
scn 000SightBifocalSCRIPT

Begin GameMode

    if ( player.getequipped GlassesBlackrimmed )
        rimod 000BIFOCALsight
        rimod 000FARsight
        imod 000NEARsight
    elseif ( player.getequipped GlassesReading )
        rimod 000BIFOCALsight
        rimod 000NEARsight
        imod 000FARsight
    else
        imod 000BIFOCALsight
    endif

End

 

 

Edited by Unno
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...