Jump to content

Scripting problems with GetSelf


Bromm83

Recommended Posts

Posted

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.

Posted

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.

Posted

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

Posted

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!

Archived

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

  • Recently Browsing   0 members

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