<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.shootemupkit.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Parent_Entity</id>
	<title>Parent Entity - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.shootemupkit.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Parent_Entity"/>
	<link rel="alternate" type="text/html" href="https://www.shootemupkit.com/wiki/index.php?title=Parent_Entity&amp;action=history"/>
	<updated>2026-04-09T08:35:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://www.shootemupkit.com/wiki/index.php?title=Parent_Entity&amp;diff=94&amp;oldid=prev</id>
		<title>Wikiadmin: Created page with &quot;==Parent and Child Items== In-game items can be attached to one another.  A tank could have a turret attached; or the Player ship could have a spotlight attached.  The item th...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.shootemupkit.com/wiki/index.php?title=Parent_Entity&amp;diff=94&amp;oldid=prev"/>
		<updated>2020-05-24T13:36:27Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Parent and Child Items== In-game items can be attached to one another.  A tank could have a turret attached; or the Player ship could have a spotlight attached.  The item th...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Parent and Child Items==&lt;br /&gt;
In-game items can be attached to one another.  A tank could have a turret attached; or the Player ship could have a spotlight attached.  The item that has the other attached to it is known as the ''Parent'' item.  The Item which is attached is referred to as the ''Child'' item.  The child item uses the parent’s position and rotation properties as the basis for its own position and rotation.  A turret on a tank could still rotate independently, but if the base of the tank (the parent) rotated then it would still affect the direction the turret was facing.&lt;br /&gt;
 &lt;br /&gt;
[[File:Parent1.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The child item is usually attached using a [[Tags Tab|Tag point]] on the parent.  This will specify the location and rotation of the child.&lt;br /&gt;
The Shoot ‘Em Up Kit provides options to set the relationship between the parent and child items.  &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
[[File:Parent2.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Parent'''&lt;br /&gt;
&lt;br /&gt;
The child item can set which item is its parent.  This can be done by selecting the item in the [[Level Editor|Level Editor]] and setting the ''Parent'' properties so it is already set-up when the level starts; or you can choose to ''Assign Parent In-Game'' and attach the child to the parent using an [[Actions Tab|Action]] event.&lt;br /&gt;
 &lt;br /&gt;
[[File:Parent3.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Tag'''&lt;br /&gt;
&lt;br /&gt;
If the Parent item has any [[Tags Tab|Tags]] set-up then a Tag can be selected for the child to attach to.  The tag will specify the position and rotation (assuming ''Use Position'' and ''Use Rotation'' properties are set).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Use Position'' - This specifies whether the child item will use the parent’s position or, if a Tag has been specified, the Parent’s Tag Position.&lt;br /&gt;
&lt;br /&gt;
''Use Rotation'' - This specifies whether the child item will use the parent’s position or, if a Tag has been specified, the Parent’s Tag Position.&lt;br /&gt;
&lt;br /&gt;
''Use Offset'' - This specifies whether the child item will use an offset from the parent’s position or Tag Position.  If an offset is required then the X, Y and Z co-ordinates of the offset values can be set.&lt;br /&gt;
  &lt;br /&gt;
[[File:Parent4.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Use Health'''&lt;br /&gt;
&lt;br /&gt;
The ''Use Health'' property allows you to choose whether the child item shares its parent’s health.  This would usually be true for a tank’s turret as the base and turret can be considered both parts of the same tank.  When the base is destroyed the turret is too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Only Active with Parent'''&lt;br /&gt;
&lt;br /&gt;
Some items should only become active once they’re attached to a parent.  A weapon pick-up, for example, should only become active and allowed to fire once it has been collected and attached to the player ship.  If the item is dropped it will become inactive again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Actions==&lt;br /&gt;
&lt;br /&gt;
There are actions for attaching and detaching child items.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Attach Child'''&lt;br /&gt;
&lt;br /&gt;
A child item can be attached to a parent by using the ''Attach child'' action on an event in the parent’s [[Actions Tab|Action tab]].  For example, to allow a player to pick-up a weapon you would use the ''Collision'' event on the Player’s Action tab.  When the player collided with the weapon pick-up the ''Collision'' event would be activated and the item the player collided with would be attached as a child. &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
[[File:Parent5.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Detach Child'''&lt;br /&gt;
&lt;br /&gt;
A child item can be detached from its parent using the ''Detach Child'' option.  For example, an attached weapon could be dropped by responding to a button press event on the Player’s [[Actions Tab|Action tab]].  If the Action is set to ''Detach Child'', then any attachments would be detached.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
[[File:Parent6.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Attach/Replace Child'''&lt;br /&gt;
&lt;br /&gt;
The ''Attach/Replace Child'' option is a combination of ''Attach Child'' and ''Detach Child''.  If the Parent doesn’t have any child items attached, then it will attach the item referenced by the event (e.g. the item the Player has collided with if it’s a collision event).  If the Parent already has a child item then the Parent’s current child item will be detached and the new item will be attached instead.&lt;br /&gt;
 &lt;br /&gt;
[[File:Parent7.png|link=]]&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
		
	</entry>
</feed>