Jump to content

need some help with scripting, might be dumb


Recommended Posts

Posted

so i want to check if players is naked, and add it as a condition.

 

i property the slamainscript and use player.isinfaction(sla.slanaked)

is this right or do i have to dim the faction slanaked in my mod again? or stn else.


beacause it doesn't work :c

Posted

Hello. slaNaked is part of Sexlab Aroused. If you have the mod as dependency you can use it, but it is not easy to use this info as trigger.

If you want to catch when the player becomes naked, do something like this.

 

Create a quest (myQuest)

Create a script in the quest (myQuestScript)

Create a ReferenceAlias inside the Quest (PlayerCheck) and set it to the player (cell=any, player)

Add a script to the RefAlias (myNakedCheck)

 

 

Scriptname myNakedCheck extends ReferenceAlias
 
Actor Property PlayerRef Auto
 
Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference)
  if playerRef.GetWornForm(Armor.GetMaskForSlot(32)) as Armor
    (getowningQuest() as myQuestScript).setNude(true)
  endIf
EndEvent
 
Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)
  if playerRef.GetWornForm(Armor.GetMaskForSlot(32)) as Armor
    (getowningQuest() as myQuestScript).setNude(false)
  endIf
EndEvent
And then the script for the quest, here you can do what you want:

 

Scriptname myQuestScript extends Quest Conditional

Int Property isPlayerNude Auto Conditional

Function setNude(bool nude)
 if nude
   isPlayerNude=1
   ; "You can do something event based here, if you need."
 else
   isPlayerNude=0
   ; "You can do something event based here, if you need."
 endIf
EndFunction

And the property isPlayerNamed is conditional, so you can use it to condition topic, packages, etc. (getVMScriptVariable...)

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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