Sorry in advance if the question seems dumb, but I do dig through the forum and find no answer to that.
I want to use the GetRelationship( Actor1, Actor2, "relationship type" ) function for Player1 and Player2 in the dialogue text part of my conversation.
I tried:
[lua(GetRelationship(Player1, Player2,"relationship type")]
but it have error. Why and what is relationship type?
how to use Relationship function
Re: how to use Relationship function
Hi,
Assuming "Player1" and "Player2" are the Names of actors in the dialogue database, try this:
[lua(GetRelationship(Actor["Player1"], Actor["Player2"], "relationship type")]
Assuming "Player1" and "Player2" are the Names of actors in the dialogue database, try this:
[lua(GetRelationship(Actor["Player1"], Actor["Player2"], "relationship type")]
Re: how to use Relationship function
Tony, thank you for your quick reply.
I tired, but it didn't work.
I am using the "Start Conversation" in playmaker, and it return this error message:
Dialogue System: Lua code 'reutrn GetRelationship(Actor["Player1"], Actor["Player2"], "relationship type"' threw exception 'Code has syntax errors
Here are some screen-cap for reference.
I tired, but it didn't work.
I am using the "Start Conversation" in playmaker, and it return this error message:
Dialogue System: Lua code 'reutrn GetRelationship(Actor["Player1"], Actor["Player2"], "relationship type"' threw exception 'Code has syntax errors
Here are some screen-cap for reference.
Re: how to use Relationship function
Hi,
You're missing a right parenthesis. Try this:
[lua(GetRelationship(Actor["Player1"], Actor["Player2"], "relationship type"))]
(Notice the second parenthesis near the end.)
p.s. - You can specify a relationship type that makes sense in your game, such as "Love" or "Obligation". Example:
[lua(GetRelationship(Actor["Player1"], Actor["Player2"], "Respect"))]
p.p.s. - To take a screenshot, you can press the PrtSc key on Windows. On Mac, use Shift+Command+3.
You're missing a right parenthesis. Try this:
[lua(GetRelationship(Actor["Player1"], Actor["Player2"], "relationship type"))]
(Notice the second parenthesis near the end.)
p.s. - You can specify a relationship type that makes sense in your game, such as "Love" or "Obligation". Example:
[lua(GetRelationship(Actor["Player1"], Actor["Player2"], "Respect"))]
p.p.s. - To take a screenshot, you can press the PrtSc key on Windows. On Mac, use Shift+Command+3.
Re: how to use Relationship function
Thank you again. Tony.
Re: how to use Relationship function
Glad to help!