Jump to content

Manning a 50-Cal MG ?


CrazyMahone
 Share

Recommended Posts

I cannot figure out how to create a human who can operate a 50-calibre machine gun. I've tried various human types and placed them physically on/next to the 50-calibre machine gun turret, but they're not smart enough to use it.

Is it a particular type of human, or do I script it to attach the human to the gun. If so how?

Link to comment
Share on other sites

the gun and the bot need the same name,

then just activate the bot in the script like u normaly do

he will spawn on the gun

It didn't work ... which meant I'm not sure what you meant by a bot. Is that a type of human, or just your term for human. Anyway ...

Here's what I did ... I added a gun ... specifically a "mk19" and called it "gun_4". Next I took one of my human units and attributes where:

  • name=gun_4
  • order=none
  • transport=none
  • crew=unchecked
  • GroupID=human_1
  • GroupType=mex_ranger_support

The group is spawned at the start of the game, but it didn't work ... in fact, when saving, it erased the name of "gun_4" and replaced it with "none".

Clearly I didn't get it.

Link to comment
Share on other sites

the gun and the bot need the same name,

then just activate the bot in the script like u normaly do

he will spawn on the gun

It didn't work ... which meant I'm not sure what you meant by a bot. Is that a type of human, or just your term for human. Anyway ...

Here's what I did ... I added a gun ... specifically a "mk19" and called it "gun_4". Next I took one of my human units and attributes where:

  • name=gun_4
  • order=none
  • transport=none
  • crew=unchecked
  • GroupID=human_1
  • GroupType=mex_ranger_support

The group is spawned at the start of the game, but it didn't work ... in fact, when saving, it erased the name of "gun_4" and replaced it with "none".

Clearly I didn't get it.

Okay figured it out ... well, I didn't but the recent FishMonger tutorial talks about it.

Link to comment
Share on other sites

its easy

1.set a mg "name_id" gun_1

2.set a mex soldier(a single infantry or specops) "group_id" gun_1

3.activate in the script

dont use rangers on guns, couse the rangers are allways 2 - 4 bots

btw, with bot i mean an ai controlled human.

never heard the word bot?

edit:

just seen that, leav the name alone they wont do anything.

for probs its the "name_id"

for bots its the "group_id"

example how it should look like, taken out of a original map

<unit name="group_unit" group="mex_infantry_patrol1" group_id="base_mg2" vehicle_id="none" crew="false">

<order order="Guard" source_pos="-6792.8447 -19680.805 495.77448" order_pos="-7410.6191 -17857.822 496.38269" patrol_type="moveguard_recon">

</order>

<position pos_x="-6792.8447" pos_y="-19680.805" pos_z="695.77448"/>

<rotation yaw="0" pitch="0" roll="0"/>

</unit>

<unit name="m2hb_tripod" unit_id="4070" name_id="base_mg2" cover_off="false">

<position pos_x="-6962" pos_y="-19480" pos_z="489.80954"/>

<rotation yaw="0" pitch="0" roll="12.710446"/>

</unit>

Edited by AmEyeBlind
Link to comment
Share on other sites

example how it should look like, taken out of a original map

<unit name="group_unit" group="mex_infantry_patrol1" group_id="base_mg2" vehicle_id="none" crew="false">

<order order="Guard" source_pos="-6792.8447 -19680.805 495.77448" order_pos="-7410.6191 -17857.822 496.38269" patrol_type="moveguard_recon">

</order>

<position pos_x="-6792.8447" pos_y="-19680.805" pos_z="695.77448"/>

<rotation yaw="0" pitch="0" roll="0"/>

</unit>

<unit name="m2hb_tripod" unit_id="4070" name_id="base_mg2" cover_off="false">

<position pos_x="-6962" pos_y="-19480" pos_z="489.80954"/>

<rotation yaw="0" pitch="0" roll="12.710446"/>

</unit>

Okay, it's working but not working. I have a guy mounted on an MK19 which I assume should be firing bullets. He's not. He's firing rocket propelled grenades. I don't think he's supposed to do that because the prop graphic for the gun clearly shows .50 calibre bullets. Of course, I'm hoping I've discovered something fiendishly evil.

PROP:

<unit name="mk19" unit_id="15475" name_id="gun_0" cover_off="false">

	<position pos_x="-4396" pos_y="63629" pos_z="-1.5258789e-005"/>

	<rotation yaw="0" pitch="0" roll="-179.99583"/>

</unit>
HUMAN:
<unit name="group_unit" group="mex_guerilla_recon1" group_id="gun_0" vehicle_id="none" crew="false">

	<order order="Guard" source_pos="-4389.9897 63770.59 0" order_pos="-4389.9897 64270.59 -3.0517578e-005" patrol_type="moveguard_recon">

	</order>

	<position pos_x="-4389.9897" pos_y="63770.59" pos_z="199.99997"/>

	<rotation yaw="0" pitch="0" roll="0"/>

</unit>
AREA DEFINITION:
			<area name="gun_0_spawn">

				<shape type="box" length="-2187.5742" width="-259.72266" height="0">

					<position pos_x="-5036.3877" pos_y="58013.023" pos_z="0"/>

				</shape>

			</area>
MISSION SCRIPT ELEMENTS: There are other elements in the start_game that I excluded.
	<area_group name="gun_0_spawn" area_name="gun_0_spawn" group="mp_players" interval="0.3" condition="1"/>


	<user name="user" type="once">

		<trigger type="UnitInArea" area="gun_0_spawn"/>

		<event name="activate_gun_0_spawn"/>

	</user>


	<event name="activate_gun_0_spawn">

		<element type="ActivateGroup" group_id="gun_0" start_time="2"/>

		<element type="UnitInArea" area="gun_0_spawn" state="deactivate" start_time="3"/>

	</event>


	<event name="start_game">

		<element type="UnitInArea" area="gun_0_spawn" state="activate" start_time="3"/>

	</event>

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...