Jump to content

Questions about using the TurretHolder


Lopess
 Share

Recommended Posts

It seems to me that using the turrets component it would be possible currently in 0ad (I'm using the alpha 27 version) to create a unit with a turret sub unit, but I'm having difficulties implementing it, I intend to create a turret on top of an armored vehicle in the future , in which the turret has its movement independent of the vehicle, rotating on its own axis fixed above the vehicle.

Code:

<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_cavalry_ranged_javelineer">
  <Identity>
    <Civ>coalition</Civ>
    <SpecificName>VBL</SpecificName>
    <Icon>units/hele/siege_tower.png</Icon>
  </Identity>
  <Promotion disable=""/>
  <Sound>
    <SoundGroups>
      <attack_ranged>attack/weapon/rifle_attack.xml</attack_ranged>
      <walk>actor/human/movement/walk.xml</walk>
      <run>actor/human/movement/run.xml</run>
    </SoundGroups>
  </Sound>
  <TurretHolder>
    <TurretPoints>
	<One>
	<X>0.1</X>
	<Y>0.1</Y>
	<Z>2.0</Z>
	<Template>units/coalition/infantry_rifleman_assalt</Template>
	<Angle>1.54</Angle>
	<Ejectable>false</Ejectable>
	</One>
    </TurretPoints>
  </TurretHolder>
   <UnitMotion>
    <WalkSpeed>19.0</WalkSpeed>
    <RunMultiplier>1.67</RunMultiplier>
  </UnitMotion>
  <VisualActor>
    <Actor>units/coalition/VBL.xml</Actor>
  </VisualActor>
</Entity>

 

Result (The game does not ask for errors, and it seems to me that it identifies the indicated template because when changing its name the game says it cannot find it)

 

Captura de tela de 2023-06-13 16-40-17.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...