I am having trouble scipting dialogue so that my player character recieves an item/object and that item leaves the room only when the player character chooses a specific option in the dialogue.Ã, As of right now the player gets the object and it leaves the room as soon as the dialogue begins.Ã, If anyone could help me that would be great.Ã, Thankyou.
Do a forum/manual search for "run-script X" and "dialog_request".
The dialog command "add-inv X" might be all you need, though.
Thanks for the help but I tried using the dialogue-request global script but I recieved the same problem with the player recieveing the item as soon as the dialogue starts instead of after choosing option 2.
This is what I put for the global script:
function dialog_request (int a) {
if (a==1) {//cSteve.AddInventory (irestorder);
}
}
and this is what I put in the dialogue script
@2 // option 2
"blah blah blah"
//run-script a;
@3 // option 3
NANCY: "...lovely."
stop
Here's how it should work:
function dialog_request (int a) {
if (a==1) {
cSteve.AddInventory (iRestorder);
}
}
@2 // option 2
"blah blah blah"
run-script 1 // 1 instead of a, NO semi-colon
return // return to dialog choice
@3 // option 3
NANCY: "...lovely."
stop
Don't forget to "return" after each choice, otherwise the script will just continue running through every option.
Thanks a lot KhrisMUC. That worked perfectly.