nicked on 24/10/2016 at 16:41
I've got an AIWatchObj link set up. One of the steps is to add a Link - Flavor = CreatureAttachment to attach an object to the AI in question. Unfortunately it seems to default to attaching the object to his torso, not his hand as I would like. Any way I can preset the link data or apply it dynamically during the AIWatchObj sequence?
Yandros on 24/10/2016 at 17:25
Probably using NVScript, but what I would suggest is you go ahead and attach the object as you want it but set its alpha to 0 and give it the NVPhantomTrap script. Then the AIWatchObj link can just send it a TurnOn some way (frob a button linked to it, for example) to make it appear.
Also, with DetailAttchment links it's easier to position things than with CreatureAttachment.
nicked on 24/10/2016 at 18:47
OK PhantomTrap works a treat, except for the particles that are attached to the object.
I sort of got it working like so:
* Object is Detailattached to the AI permanently.
* Object starts with 0 Alpha, and no particleattachment.
* The AIWatchObj first frobs a button which makes the object visible.
* Next it adds a Link: Particleattachement, between the object and the particles.
* The AI does his thing.
* Then he frobs another button linked to an Inverter, that controls the object, and it fades out nicely.
* Finally the particleattachment link is removed.
That all works fine. However, when the particleattachment link is removed, I think something is going wrong with the particles. I would expect to have had to move them into a blue room or something, but they completely disappear rather than remaining at the point of the link removal.
The second time the AI comes round on his patrol, he runs through the whole AIWatchObj setup again, only this time, at the point of adding the particleattachement link, the object gets a big white wedge attached to it instead. It's like the link removal is somehow breaking the particle object, so that when it's added the next time, it's just a generic white wedge object and has lost all its properties.
Really odd.
Edit: It may be making a white wedge because it's putting the particle object too far away? I tried getting the Phantom Off button to also teleport the particles nearby. They are not visible still, but at least there's no wedge this time.
Nameless Voice on 24/10/2016 at 18:53
If you break a particle attachment link, the particle object is automatically deleted.
Why not just turn the particles off?
You can use either StdParticleGroup or NVParticleGroup.
nicked on 24/10/2016 at 19:02
Yep - for some reason I had a mental block and forgot you could send TurnOn/TurnOff messages to particles. I've hooked the same buttons up to it, and it works just fine now.
Thanks for the help!
nicked on 24/10/2016 at 19:25
For anyone interested, here's the finished result:
[video=youtube;CfdPhJ0ftfI]https://www.youtube.com/watch?v=CfdPhJ0ftfI[/video]
Nameless Voice on 24/10/2016 at 19:58
That would work a lot better if he kept his sword sheathed while doing it - right now, it looks like he stabs himself in the head.
(I'd make the smoke particles slightly smaller, too.)
nicked on 24/10/2016 at 20:05
Yeah - guess that would need a model swap for an unarmed guard?
nicked on 24/10/2016 at 20:20
Thanks - I'll take a look!