Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Start conversation on activation of item in inventory?

Page: 1 of 1
 ltlukelt
12-31-2010, 7:58 AM
#1
I'm trying to initiate a conversation when an item in the players inventory is clicked. I have been able to setup a new spell in spells.2da so when the item is activated, the new spell is cast, which leads to a script being executed which is attached to the spell.

This mods idea is based on Darths mod here (http://www.lucasforums.com/showthread.php?t=131206)

I am trying to achieve the same effect as shown in the mod above and the only part I am stuck on is how to start a conversation once an item is activated?

Sorry if this sounds confusing!


Thanks.
 TimBob12
12-31-2010, 12:33 PM
#2
have a script to start a conversation


void main()
{
ActionStartConversation(GetFirstPC(),"dlg_filenamehere");
}


Im a bit confused as to your intentions. So the item casts a spell. Then the spell runs the script. If so I think that is all you need.

Just had a look in Spells.2da and the column

impactscript

needs to have the launch conversation script above.

Then in your armband .uti file in the properties tab, have an ActivateItem line that activates your line in Spells.2da

If you have any trouble just ask.
 ltlukelt
12-31-2010, 4:33 PM
#3
Thanks, but I still can't get it to work. Ill explain it better:

I currently have an armband.uti file which is given to the PC at the start of the game through an edit of m01aa_c01.dlg. The armband properties looks like this:

http://a.yfrog.com/img619/50/txv.th.png) (http://yfrog.com/h7txvp)

While the spells.2da look like this:

http://a.yfrog.com/img616/9256/0v5l.th.png) (http://yfrog.com/h40v5lp)

Once the armband is activated as shown here:

http://a.yfrog.com/img612/9813/01zf.th.jpg) (http://yfrog.com/h001zfj)

the spell is supposed to run, which in turn has a script attached via impactscript. This script then starts a conversation with the PC. The problem is that the dialogue dosn't show up. When clicked the armband does nothing.

Any ideas?
 TimBob12
12-31-2010, 5:09 PM
#4
Sorry but could I have a better picture of the armband properties because in that one the tooltip is over it. Also I don't know how you are taking the pictures but just use the
Print Screen Button
as it may be a bit clearer.

Also I take it you compiled the script.
 ltlukelt
12-31-2010, 5:17 PM
#5
Sorry, heres a better pic:

http://a.yfrog.com/img611/9773/ull.th.png) (http://yfrog.com/gzullp)

All of my scripts are also compiled.

I have no idea why the pictures are blurry, I'm using PrintScreen :confused:
 bead-v
12-31-2010, 6:33 PM
#6
Maybe there's a problem with the owner of the script. You can try this:

void main(){
AssignCommand(GetFirstPC(), ActionStartConversation(GetFirstPC(),"NAMEOFDLG"));
}
 ltlukelt
01-01-2011, 4:56 AM
#7
^^Thanks. Just tried it but it's still not working though. I have no idea what the problem is!
 TimBob12
01-01-2011, 5:13 AM
#8
I notice that you have a subtype set to Death. Ive been looking at some other examples and they all have a subtype set to ERROR
 ltlukelt
01-01-2011, 5:53 AM
#9
I believe the Subtype is the name of the spell set in spells.2da. I will look into it however. Thanks for the suggestion :thmbup1:

I have just replaced the .dlg file in Darths mod with my own and it seems to be working. It looks like the problem is with one of the scripts or the spells.2da file.

It is now fully working after I used the spells.2da and activate script from Darths mod and renamed them accordingly. Thanks for all the help!
 TimBob12
01-01-2011, 7:17 AM
#10
Glad to hear it and your welcome
Page: 1 of 1