Page 1 of 1
subentities and AIs
Posted: Thu Apr 07, 2011 1:22 pm
by Smivs
I've got a little thing working nicely as a free-standing entity, but I actually want it to be a subentity of something else. When I use it as a subentity it doesn't work. It seems the AI isn't being applied. Is it not possible to apply a custom AI to a sub-entity?
Re: subentities and AIs
Posted: Thu Apr 07, 2011 1:55 pm
by Thargoid
Nope, each entity overall can only have one AI...
Re: subentities and AIs
Posted: Thu Apr 07, 2011 2:01 pm
by Smivs
OK Thargoid, thanks <wanders off muttering 'bugger'>
Re: subentities and AIs
Posted: Thu Apr 07, 2011 2:21 pm
by Thargoid
What are you trying to do? A reasonable amount of what AI's can do can these days be replicated at least partially in scripting.
Re: subentities and AIs
Posted: Thu Apr 07, 2011 4:23 pm
by Killer Wolf
Thargoid wrote:Nope, each entity overall can only have one AI...
hoping i don't make myself look stupid (and ignoring calls of "too late!") ~ how then do the subent missiles work on Griff's Cobra, given the ship must have a Tradery-type AI and the missile would have to have a Missile AI?
Re: subentities and AIs
Posted: Thu Apr 07, 2011 4:26 pm
by Thargoid
When the missiles are on the model, they're just dummy sub-ents without AI.
Now the slight of tentacle occurs when a missile is fired. The script notes the position of the next available sub-ent, removes it, moves the newly fired missile from its launch position to the position that the sub-ent just vacated (and sets the orientation too) and then things go on their merry way. It's all done in a single script cycle so nothing is visible.
Basically the missile that hangs under the Cobra isn't the missile that ends up coming towards you
Re: subentities and AIs
Posted: Fri Apr 08, 2011 8:57 am
by Killer Wolf
that's clever stuff.
i'm going to have to download and nick it to use on my Phantom