OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: CharlieReddog on 06 Jun 2008, 20:02:10
-
I've created a smallish ambush mission, but what I'm finding is it's a little too easy to wipe out the enemy. What I'd like is on the firing of a particular trigger (Already set up), the leader of the ambushed squad to throw a smoke grenade. The location being what it is, the direction of the smoke probably doesn't matter, because as soon as it pops it's going to obscure much of the ambush position.
I've tried the following, but nothing seems to work. I have of course equipped the leader (m1) with the this addmagazine "smokeshellred".
m1 fire ["smokeshellredmuzzle","smokeshellredmuzzle","smokeshellred"] (this is in Mr Murray's manual.
m1 fire ["throw","smokeshellredmuzzle","smokeshellred"] m1 action ["smokeshellredmuzzle","smokeshellredmuzzle","smokeshellred"]
None of the above seem to work. Of course the loon in question has other weapons, do I need to order him to switch weapons or something? ???
-
Ummm, try:
m1 fire ["throw","smokeshellred","smokeshellred"];
I can't try it myself for reasons of hardware failure. :dry:
Planck
-
Tried and nope, that's not it. This is annoying! thanks for the help though.
-
The Domination mission has AI that pops smoke almost every time they are fired at. Might want to pick that apart to see how they did it.
-
This works for me:
m1 fire ["SmokeShellRedMuzzle"]
-
The Domination mission has AI that pops smoke almost every time they are fired at. Might want to pick that apart to see how they did it.
As far as I know, thats a simple createVehicle (camCreate?) or something similiar, no Smoke grenade is "thrown" as such.
-
I don't get it then. I have set up a radio trigger with m1 fire ["smokeshellred"] as h- suggests, but it doesn't work. What am I doing wrong?
-
no Smoke grenade is "thrown" as such.
Starting with version 3.0 a smoke grenade is "thrown" as such. The script is even checking each unit in the group for a smokeshell and the unit that has one actually throws it.
Part of the x_dosmoke.sqf script:
_one_shell_muzzle = (switch (_one_shell) do {case "SmokeShell": {"SmokeShellMuzzle"};case "SmokeShellRed": {"SmokeShellGreenMuzzle"};case "SmokeShellRed": {"SmokeShellRedMuzzle"};});
_shell_unit selectWeapon _one_shell_muzzle;
sleep 0.121;
if (_shell_unit == _leader) then {
_shell_unit doTarget _killer;
sleep 0.234;
_shell_unit fire _one_shell_muzzle;
} else {
_shell_unit commandTarget _killer;
sleep 0.234;
_shell_unit fire _one_shell_muzzle;
};
And I guess the error that you make is that you don't use the muzzle name.
Xeno
-
I've edited this for my test mission as follows. I've even made M1 a squad leader which should have the redsmoke shell anyway so nolonger adding a magazine.
_shell_unit=M1;
_one_shell_muzzle = "SmokeShellRedMuzzle";
_Killer=P1;
_shell_unit selectWeapon _one_shell_muzzle;
sleep 0.121;
if (_shell_unit == _leader) then {
_shell_unit doTarget _killer;
sleep 0.234;
_shell_unit fire _one_shell_muzzle;
} else {
_shell_unit commandTarget _killer;
sleep 0.234;
_shell_unit fire _one_shell_muzzle;
};
And it still doesn't work. Will someone please just give me the code!!! PLEASE! :dunno:
-
Well according to the comref it takes it as (muzzle, mode, magazine) or (muzzle, mode).
So try it using the appropriate muzzle:
m1 fire ["smokeshellredmuzzle","smokeshellred","smokeshellred"];
or
m1 fire ["smokeshellredmuzzle","smokeshellred"];
Planck
-
And it still doesn't work. Will someone please just give me the code!!! PLEASE! :dunno:
_shell_unit=M1;
_shell_unit addMagazine "SmokeShellRed";
_one_shell_muzzle = "SmokeShellRedMuzzle";
_Killer=P1;
_shell_unit selectWeapon _one_shell_muzzle;
sleep 0.121;
_shell_unit commandTarget _killer;
sleep 0.234;
_shell_unit fire _one_shell_muzzle;
Works fine here. Though the unit needs to have a SmokeShellRed, otherwise it won't work.
Xeno