• Announcements

    • Ashal

      SITE MOVED - IN READ ONLY MODE   12/08/2015

      Please use http://www.loverslab.com moving forward. Site has been restored to a previous version, and this one placed into a read-only mode. This is available for a limited time so users may reference/copy content that has been lost in the transition. This will no longer be accessible by December 22nd, 2015.

Archived

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

Bromm83

Scripting problems with GetSelf

Can anyone help me with this?


scn 00SexoutDiscountQuestScript

ref self

Begin GameMode

set self to GetSelf

if self.GetItemCount SexoutDiscountToken
self.startconversation player, AfterDiscount
endif
End

It's a questscript that should start a conversation after sex.

If I remove the "set self to GetSelf" part it accepts the script, but then the script is useless...

Anyone got any bright ideas?

EDIT: It's for Fallout New Vegas btw.

0

Share this post


Link to post

If it's a questscript, GetSelf would refer to the quest it is attached to, which I think isn't even a valid reference. You'll instead want to get the id of the NPC that should start the conversation. Possibly use a conversation result or some other script to : Set [Questname].NPCref to GetSelf and then replace self.startconversation with NPCref.startconversation.

0

Share this post


Link to post

Spot on.

As an aside, iirc the quest is a valid ref, but the quest script is not. So to set the variables in the quest script you do:-

set questname.var to 1

not

set questscriptname.var to 1

0

Share this post


Link to post

If it's a questscript' date=' GetSelf would refer to the quest it is attached to, which I think isn't even a valid reference. You'll instead want to get the id of the NPC that should start the conversation. Possibly use a conversation result or some other script to : Set [Questname'].NPCref to GetSelf and then replace self.startconversation with NPCref.startconversation.

You, my friend, are a genious!

Now the script works as intended!

0

Share this post


Link to post