Conversation: Need some scripting help.

A place for players to discuss building content (toolset Q&A etc.)
Post Reply
ChikenKannon
Dasarian Hero
Posts: 1268
Joined: Tue Nov 14, 2006 10:34 am
Main Player Character: ------
Other PCs: Haven't touched these in ages:
Lok'Tok
Lorne Mearesworth
Mars Benedict
Cpl John Mackev
Gutsnikk
Lorne Xavier Sunderson Falderhouse Skulltickler Mearesworth
Oronar
Location: Somewhere over the rainbow

Conversation: Need some scripting help.

Post by ChikenKannon »

How do you make it so that after selecting an option in a conversation you get an item? And then how do you make it so that you can't have two at the same time?

CLARIFY:

What I want to do is when a specific choice is taken in a conversation, the player receives an item.

^Situation^
Person is looting a corpse and finds a key.



Then at the door when he uses said key it gets used up after reaching the other side of the door.

^Situation^
Key breaks.
Rob
Forum Troll
Posts: 3146
Joined: Fri Sep 22, 2006 9:39 pm
Other PCs: Amir Ma'fir, Darius Aylomen, Dewey Scoville, Jack Red-Eyes, Jørann, Kale, Leopold von Bruhl, Modelo Del Mar & Quintus d'Cerevallia
Bioware Username: robertharris
Location: Dallas, TX

Post by Rob »

Select the conversation node where the player should get the item.
Select the action tab.
Use ga_give_item( string sTemplate, int nQuantity, int bAllPCs ) to give the player the item(s).
Dusty
Dasarian Scout
Posts: 234
Joined: Mon Nov 20, 2006 5:43 am

Post by Dusty »

It's nearly bed time for me and I'm too tired to be of much use right now x.x; Sorry!

Basically, you need two scripts!

One a conditional, which makes sure the same player can't access the same conversation route twice, the other an action, which checks the player for keys and gives the player a key if he hasn't got one.

A more clumsy, though definitely more simple way of doing it is to simply script the door so that it removes all instances of the key from the player's inventory when they unlock the door, thus rendering dropping the key and talking again to recieve extra keys fruitless.
Fat little moth.
Post Reply

Return to “The Carpenter's Hall”