Page 1 of 1
conversation on a placeable ?
Posted: Sun May 11, 2003 7:45 pm
by JollyOrc
Hi!
I want to add a conversation to a placeable so one has a few options to do. Is that possible, and how ?
Posted: Sun May 11, 2003 9:51 pm
by Nightface
The advanced tab of the placeable's properties has a slot for a conversation.
Tanmar
Posted: Sun May 11, 2003 10:16 pm
by Papillon
You'll have to add a call to ActionStartConversation() (or something like that) in the OnUsed event.
Posted: Sun May 11, 2003 11:40 pm
by JollyOrc
Papillon wrote:You'll have to add a call to ActionStartConversation() (or something like that) in the OnUsed event.
that's the one I've been missing.
Thanks Pap, I'll find my way around the rest.
Posted: Thu Jun 19, 2003 9:21 pm
by Lord Deathwalker
thats the answer ive been lookin for for days DOH!!!! all ive been gettin is pop up text on placeables Thanks!!
Posted: Sun Oct 12, 2003 11:33 am
by Nighthawk4
How do you add a conversation to an item please, so you get a choice of actions when you use it, like an Emote Wand?
Indeed, how do you define what it does when it is Used?
Posted: Sun Oct 12, 2003 12:37 pm
by JollyOrc
the item has an onUsed field, just add the script there.
Posted: Sun Oct 12, 2003 3:20 pm
by maxinion
Does it, Jolly? I was under the impression you had to go toy with the OnItemActivated script of the module. Set an instance object to be GetLastObjectActivated or somesuch, and then get its tag. Compare that to the one you know you want to start the conversation, and then use the ActionStartConversation inside an if statement to do it. That's how I've always done it.
Posted: Sun Oct 12, 2003 4:29 pm
by JollyOrc
I admit, I've mostly guessed here..
you might be right max
Posted: Sun Oct 12, 2003 4:43 pm
by Alexandru Stanicu
IIRC placeables have that event, items do not
Posted: Sun Oct 12, 2003 4:50 pm
by Nighthawk4
OK, I have done the OnItemActivated part and it runs the script, but not a Conversation.
I assume I need an ActionStartConversation() in the script, but not sure how to do that.
Posted: Sun Oct 12, 2003 6:02 pm
by Jeffi0
I believe it's just BeginConversation(conversationname). Just stick it in the script, edit the conversation using the conversation editor, and you're set.
Posted: Sun Oct 12, 2003 8:23 pm
by maxinion
Sounds right, Jeff.
Posted: Sun Oct 12, 2003 8:39 pm
by Vicky
Just for future reference:
Functions that start with the word Action are added to a players action queue (that bit in the top left of your screen).
What you are doing here is getting the item to start the conversation which is why the Action function doesn't work.
Vicky
Posted: Sun Oct 12, 2003 9:19 pm
by Nighthawk4
I have the item, with a conversation and a script of the same name.
The OnActivateItem script is in the Module, the script contains the BeginConversation command.
When I try a different item, it does work. However, the one with the conversation still does not begin the conversation.
When I edit the conversation, it has no owner - but the item does not appear as a valid owner of a conversation.
Is that why it will not start the conversation?
--------------------------------
Edit:
Eventually, I came up with this:
Code: Select all
void main()
{
object oPC;
object oTarget;
oPC = GetItemActivator();
oTarget = oPC;
AssignCommand(oTarget, ActionStartConversation(oPC, "emotewand"));
}
This does work. As far as I can tell, the item is not directly involved in the conversation. It is just the thing used to make it start. The PC is talking to himself or herself.
Posted: Sun Oct 12, 2003 10:05 pm
by maxinion
Nighthawk4 wrote:I have the item, with a conversation and a script of the same name.
The OnActivateItem script is in the Module, the script contains the BeginConversation command.
When I try a different item, it does work. However, the one with the conversation still does not begin the conversation.
When I edit the conversation, it has no owner - but the item does not appear as a valid owner of a conversation.
Is that why it will not start the conversation?
--------------------------------
Edit:
Eventually, I came up with this:
Code: Select all
void main()
{
object oPC;
object oTarget;
oPC = GetItemActivator();
oTarget = oPC;
AssignCommand(oTarget, ActionStartConversation(oPC, "emotewand"));
}
This does work. As far as I can tell, the item is not directly involved in the conversation. It is just the thing used to make it start. The PC is talking to himself or herself.
That's fine. Very inefficient though. Replace all those object calls with object oTarget=GetItemActivator();
Keep in mind this will run for every single OnItemActivated. You may want to do a comparison to the tag of the called item, to a specific check. Would work better.
Posted: Wed Oct 15, 2003 7:32 pm
by Actually
For anyone who d/l'd the first "Witch's Wake" module, go check out the "Mountain Cemetery" area. All them little boulders they used to kludge climbing up hills use a very, very smooth conversation call.
Bye Now,
Jerry Cornelius - Script Monkey
Posted: Wed Oct 15, 2003 7:42 pm
by Aloro
Any of you who are subcontractors, and who want to make placeables talk, can just use the script I wrote and posted to the Library forum.
- Aloro