Jump to content
Sign in to follow this  
RangerX3X

Script Issue

Recommended Posts

Here is my script:

; Get the unit parameter given

_unit = _this Select 0

; Strip the units current gear

RemoveAllWeapons _unit

; Add the new gear to the unit

_unit AddMagazine "30Rnd_556x45_Stanag"

_unit AddMagazine "30Rnd_556x45_Stanag"

_unit AddMagazine "30Rnd_556x45_Stanag"

_unit AddMagazine "30Rnd_556x45_Stanag"

_unit AddMagazine "30Rnd_556x45_Stanag"

_unit AddMagazine "1Rnd_HE_M203"

_unit AddMagazine "1Rnd_HE_M203"

_unit AddWeapon "M4GL"

_unit SelectWeapon "M4GL"

_unit AddMagazine "HandGrenadeTimed"

_unit AddMagazine "HandGrenadeTimed"

_unit AddMagazine "HandGrenadeTimed"

_unit AddWeapon "Binocular"

_unit AddWeapon "NVGoggles"

_unit AddMagazine "15Rnd_9x19_M9"

_unit AddMagazine "15Rnd_9x19_M9"

_unit AddMagazine "15Rnd_9x19_M9"

_unit AddWeapon "M9"

Exit

It works, however for the player, I cannot fire until I switch to the single or burst selection with the F key. This is not a reload issue as the weapon has ammo, I just cannot fire until I use the F button to select the fire mode.

AI with this script fire immediately at enemy targets. I have to use F.

Any suggestions?

Share this post


Link to post
Share on other sites

You might want to:

reload _unit

and lastly select the weapon you want to use

_unit SelectWeapon "M4GL"

(untested, just a thought)

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit selectWeapon "M4Muzzle"will enable you to fire immediately.

Alternatively try <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit selectWeapon "M203Muzzle"if you prefer to start with the grenade launcher.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×