Boulders from asteroids question(s)

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

Moderators: another_commander, winston

User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Boulders from asteroids question(s)

Post by Thargoid »

Ahruman wrote:
Commander McLane wrote:
Perhaps it is. I'm not sure whether a subentity can spawn something. Perhaps it can't.
Calling spawn on a subentity spawns objects near the witchpoint, as the subentity’s position is in parent-relative coordinates. This is half-fixed in r4442 by treating it as if spawn() had been called on the mother. This is imperfect because it uses the mother’s origin and radius, but doing it right would be too complex for MNSR (apparently we don’t have an absolutePosition method for subentities yet!).
There's a little function to do that built into Aquatics (in the HammerHead script), courtesy of Eric. I posted it recently in reply to something McLane was doing so a quick hunt should reveal it. It's a quite simple function and works well to translate sub-ent positions to global ones (the sleds use it when switching from sub-ents to separate entities).
Post Reply