Jump to content

Scripting - please help?


Topazanite

Recommended Posts

I'd like to be able to select a dialogue option that will make my companion play the lute. Currently, my script isn't working.

This script is modified from the existing mod Reaper's Animated Lute and attached to my main companion actor's script.

 


if playlutetoggle == 1
	if ( OdileRef.getitemcount a1OdileLuteRef 1 )
		OdileRef.EquipItem a1OdileLuteRef 1
		set a1OdileLuteGlobal to 1
		playsound a1OdileLuteSound
		OdileRef.pickidle
		return
	elseif ( OdileRef.getitemcount a1OdileLuteRef 0 )
	        Message "Odile doesn't have her lute."
	        set playlutetoggle to 0
	endif
endif

if playlutetoggle == 0
		OdileRef.UnEquipItem a1OdileLuteRef 1
		set a1OdileLuteGlobal to 0
		OdileRef.pickidle		
endif

 

a1OdileLuteref is the lute item, OdileRef is the NPC, and there's an animation idle set for when a1OdileLuteGlobal is set to 1. As it stands, when I select the dialog option that toggles the playlutetoggle variable, nothing happens and I am no longer able to speak to my NPC. . . . Panic ensues! o_O

Link to comment
Share on other sites

It's currently at the default script run time. I did see some strange behavior with her idling after the script ran -- think it'll fix it if I attach this to a new quest script with OdileRef as the target? I'll give it a try anyway, how often should this be running?

 

EDIT:

 

Tried a new approach and made the lute an animobject, attaching an idle anim to it, hoping to make an AI package out of it. Having trouble making that work as well. :wallbash: This is so frustrating! SOMEONE has to know how to do it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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