subentities and AIs

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

subentities and AIs

Post 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?
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: subentities and AIs

Post by Thargoid »

Nope, each entity overall can only have one AI...
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: subentities and AIs

Post by Smivs »

OK Thargoid, thanks <wanders off muttering 'bugger'>
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: subentities and AIs

Post 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.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Re: subentities and AIs

Post 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?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: subentities and AIs

Post 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 ;)
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Re: subentities and AIs

Post by Killer Wolf »

that's clever stuff.
i'm going to have to download and nick it to use on my Phantom :-D
Post Reply