Jump to content

Scripting query- is it possible to temporarily disable specific face data?


VAULTRENEGADE

Recommended Posts

I've run into an issue with some armor clipping. A while ago, I added functional eyelashes to all races via the tongue model (under face data for races), however this is causing eyelashes to clip through the goggles on the raider psycho-tic helmet. Since the eyelashes are actually a specific part of each race and not added as a head part, I've had some difficulty resolving this issue. Ideally, I would like to create a script that disables the tongue model once equipping the helmet, but I'm not even sure if this is possible or not. Does anyone know of a specific function that could accomplish something like this? Is it possible to solely identify the tongue model via scripting?

 

Thanks for any help in advance

 

EDIT: Seems like it'll just be easier to add a script that changes the actor's race to a duplicate with no eyelashes equipped.

 

I added this script to the desired headgear and it doesn't work; what am I doing wrong here?

 

 

scn 07HeadGearScript
Begin OnEquip
MatchRace JHBCloverHair8REF
End
Begin OnUnequip
MatchRace JHBCloverHair1REF
End

 

Edited by VAULTRENEGADE
Link to comment
Share on other sites

I'd guess it is because the implied reference of the equipper , does not work with MatchRace.

Hence it would have to be a script on an actor. Or you need get the reference to then use in the line like this.

 

Ref rActor

 

rActor.MatchRace JHBCloverHair8REF

~~~~~~~~~~~~~

Not sure how to get the Ref-ID of the Equipper , since it says GetSelf should not be used in scripts of items that is or could be in inventory. But you could try it.

Also check out the JIP functions for getting Refs ... like the ones for making contact , this example:https://geckwiki.com/index.php?title=GetContactRefs

 

Also could make it cast a spell.

~~~~~~~~~~~~~~

Begin OnEquip

Cios.MyRaceMatchSpell

End

~~~~~~~~~~~~~~~

Then the Effect Script

~~~~~~~~~~

Begin ScriptEffectStart

MatchRace JHBCloverHair8REF

End

~~~~~~~~~~~

And on the UnEquip cast a different spell to do the other line.

 

But so you know , if an actor is already wearing the helmet. It won't run the OnEquip Block.

So an Object effect on the item that runs the base effect script may be better.

Although I think there may be some issues there also since it is an actor effect that need be used in getting the implied reference ???

 

And 1 more thing to mention , although I don't think it is causing a problem in this case.

I see you are using numbers in form-ID's prefix. The Script Name ...

Doing so on any form-ID can cause problems in the engine finding them. So it is a good rule of thumb to at least use 2 letters before introducing numbers. However in this case being a script that no other script would call to , probably will have no problems.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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