PDA

View Full Version : Make AI pick up object in Conversation???



Schwaa2
17th Feb 2003, 17:29
I've got a conversation where the player hands an object to an AI.

I want the AI to pick it up and carry it away. I've figured out how to make it link to him with <b>Add Link</b> /Contains, but he contains it, the object disappears and even if you club him you can't get it back.

basically I want the effect that's in Calendra's Cistern where the person picks up a glass and drinks from it, then sets it down. I just don't have T1 Dromed and can't justify DL'ing CC's at this time on 56K.

If anyone can shed some light on this for me I'd really appreciate it, the mission will go on regardless, this'll just make it alot more realistic.

Shadowspawn
17th Feb 2003, 18:04
I've got a twisted easy way to go about this.

Make your AI ALWAYS have the object (in his hands, belt, etc). You can use Mesh Attach and get it to look very realistic.

Make a couple of meta-props which have Renderer -> Has Refs : true and false. Set the meta-prop for Has Refs : FALSE on the object the AI is carrying.

During the conversation, just Add the meta-prop for Has Refs : TRUE to the object, and it will magically appear. (Or remove the FALSE one).

You can make the one the player is handing him either dissapear using the same technique, or destroy it somehow.

Schwaa2
17th Feb 2003, 18:11
Cool! thanx Shadowspawn,

I was thinking about something like that but couldn't figure out how to make it work. I've messed around with the "Keepers" from Equilibrium, but they were a MAJOR hassle. I had them working then thru a Drom crash, lost 'em. |(

I used S&R to destroy the object handed over (there are multiple objects that can be used), I figured that was the easiest way to handle more than one.

See Ya!:)

Chiefdreams
17th Feb 2003, 18:34
Ooh, can I get some more info on "Mesh Attatch?"

Schwaa2
17th Feb 2003, 18:50
I'm using a "Creature Attachment" link from the Ai to object.

In Data you can pick which joint easily (head, left hand, ect...)

Mesh attach is under props>renderer. It gives you alot more control over exact positioning of object(location, rotation, offset) but is harder to use, when I've used it it took me along time to get right. (Dl my shield object or the demon wings and there's an included text that tells you how to line them up.

Creature attachment is the way to go if you just want to put something in his hand and aren't picky about it not being perfectly aligned. In my case he'll only be holding the objects for a couple seconds anyway.

Schwaa2
17th Feb 2003, 19:07
ShadowSpawn, can't get it to work.

Made two Metas:

Visible_Invisible: has refs:False (trans/Alpha:0)
Invisible_Visible: has refs:True (trans/Alpha:100)
---------------------------------------
I've tried them with has refs, and seperately with alpha.

neither work.

I can make the object either transparent or without refs by adding that prop, but not by adding the Metaprop.

I've tried by having the props added before Conv, then adding a Meta during Conv. That doesn't work.

I've tried adding Meta before Conv, and removing during Conv. That doesn't work either.

I've even saved gamesys and miss, closed Drom and reopened for each variation.

Could it have something to do with the Creature Attach link? I'm going back in to try an unlinked object.

Schwaa2
17th Feb 2003, 20:06
Boy this is taking awhile but I'm getting it.

An AI can only Add/Remove Metaprops to itself. And only an Ai can work in a conversation. This AI also has to be awake but jumps around alot when attached to anothers hand.

They are on the same team.
The attached AI (AAI for now on) is set to Null in every catagory (vision/hearing/ect..., it has no physics (ie collision), timeWarp is really slow, 0 alertness, sly result:none, no schema/voice, alertCap 0,

I added Visible_Invisible (custom Meta- render/alpha 0)

AAI is linked to Conv as actor 2.

Report more later, AAI is still twichy as hell.

Shadowspawn
17th Feb 2003, 22:05
Ah, I forgot to mention this. In a conversation, to add/remove a metaprop to an object;

Action: Add/Remove Metaprop
arg1: Add
arg2: M-NowYouSeeIt
arg3: MyBottle

What this does is add the metaproperty M-NowYouSeeIt to the object MyBottle, which would be attached to the AI.

Schwaa2
17th Feb 2003, 22:06
Make a rat:

Add Team=Good
Damge>slay result=no effect
shape>modelname=vile1 (health potion)
give custom Meta prop (Invisible>props>render>alpha=0)
link to conversation as actor
link to AI as creature attach> left fingers

in conversation remove invisible. Potion appear in hand. later in Conv Add Invisible and teleport a new potion to where ai took it.

Mostly its just the rat, they are more stable AIs since they don't have all the extra emotional baggage :)
========
Hey SS, we posted at the same time :)
I was tring that but couldn't make it work, but if the object is an AI (rat) then it can trigger its own Metaprops.

Have you been successful having the AI trig the bottle Metaprops?

Shadowspawn
18th Feb 2003, 03:12
Yes, I've been successful with it. I'm using it to have a guy in a bar reach for his beer, pick it up, drink from it, then put it back down. Works great.

I have to manipulate the MPs of two objects to get it to work, so it was critical that the adding and removing of MPs from an object worked. I haven't had any problems with it.

I use the name of the object instead of numbers, since that always changes on me and gets me into trouble. I had the object number that was mesh attached to my AI change on me, and he was carrying around a big white wedge! Had to fix that. Mesh Attach seems to be the only place you can't use a name instead of a number.

Schwaa2
18th Feb 2003, 04:38
Hmmm, intersesting,

You are using mesh attach. i wonder if Drom lets you change meta props with mesh attach but not creature attachment. i lost my joint number shart and didn't want to mess with finding the numbers. Mine's working good now though. i use the names in Conversations too, and links to them. I've had the numbers change and REALLY screw me up.

I have an AI holding two invisible rats, each looks like something different. You hand him something, he grabs it (it dies via S&R) and the one he's holding appears, then he moves around and it disappears again, another is teleported into its place on the table.
Then something else appears in his hand, he brings that back to you and sets it down (it turns invisible) and another teleports in.

Kindof a long, drawn out process but it works good. even worse is to get the item you give him I have another coplete S&R system setup (for six possible objects).