LarryG on 21/7/2013 at 20:26
Quote Posted by sNeaksieGarrett
... one of the flaws of using one of the attachment types (don't remember which one, but my original breath setup with emitter/Contains link works fine) is that if the AI leans forward while in search mode for example, the breath will appear in a different spot instead of in front of the guard's mouth. Actually, I think it has to do with modifying Particle Launch Info, because you're basically forcing the breath to appear at a certain spot that is different from the default.
The thing is that AI's heads move. They move up, down, left, right, backwards and forwards. The question is, how much can a script know about the exact position and orientation (x, y, z, h, p, b) of an AI's head? What you want is a displacement vector from the head joint to identify the position for breath to appear. I'm not certain that any of the attachment links lets you do that (in fact I'm pretty certain that none of them do). But if the position and orientation is knowable at the time a breath should appear, then a simple (dx, dy, dz) displacement vector from the head joint to the mouth should be all the script needs to make it look right no matter if the AI is laying down, sitting, standing at idle, gesturing, walking, running, etc.. And as I said, the breath really shouldn't be attached, just placed and forgotten.
The Watcher on 21/7/2013 at 22:58
Quote Posted by LarryG
The question is, how much can a script know about the exact position and orientation (x, y, z, h, p, b) of an AI's head?
I could be wrong, but as far as I know the answer to that is "nothing". I can't see anything in the lg code that exposes the location or orientation of AI joints. There are also no messages sent to scripts when AIs move their joints, so you can't get it from messages either.
I'll keep looking, and maybe I've missed something, but I don't think that level of information is available to scripts.
Quote Posted by sNeaksieGarrett
Also, I'm curious how you actually go about writing a script for thief? What software do you use/what programming language? How hard would it be for someone who isn't an expert programmer to write a script for thief?
In the majority of cases, Thief scripts are actually written as c++ classes, compiled into a .dll file. From a complexity point of view, Thief scripts are generally pretty simple and don't require much in the way of advanced programming trickery: the actual hard part, the really difficult thing, is that the interface between your scripts and the dark engine itself (the services and systems the game gives scripts to talk to it through) is... less than extensively or helpfully documented, I'll put it that way. It takes quite a lot of time and digging to work out what is what and how and if you can do things.