Jump to content
Sign in to follow this  
thaFunkster

How to use SetDamage?

Recommended Posts

Hello,

I have been trying to use SetDamage on some BMPs.

When I put "this setDamage 1" in their init fields, it works fine.

However, when I try to call "BMP1 setDamage 1" from a script, it wont work.

Can someone tell me how to call setDamage from a script?

----

Second thing:

Man with a SMAW launcher, I want him to select it and fire at a target:

showCinemaBorder false;

setAccTime 0.5;

Bman doTarget MG2;

Bman1 selectWeapon "SMAW";

_cam = "camera" CamCreate (getPos Bman1);

_cam cameraeffect ["internal", "front"];

_cam attachTo [bman1, [0.00, -1.2, 1.3]];

_cam camsettarget MG2;

_cam camCommit 0;

Sleep 8;

Bman1 doFire "SMAW";

He wont select the launcher, and when he randomly does of his own choice on occasion, he wont fire.

Any suggestions?

Many thanks..

Edited by thaFunkster

Share this post


Link to post
Share on other sites
when I try to call "BMP1 setDamage 1" from a script, it wont work.

Try "BMP1" setDamage 1

Share this post


Link to post
Share on other sites

Thanks, but no joy I am afraid.

Yet another question if anyone can help me.

I have the Harriers flying over, I decided to use this script to get them to bomb manually:

_cam = "camera" CamCreate (getPos Air1);

_cam cameraeffect ["internal", "front"];

_cam attachTo [Air1, [-1.5, -12.00, -1.5]];

_cam camSetFOV 0.4;

_cam camsettarget BMP1;

_cam camCommit 0;

sleep 9.75;

Air1 selectWeapon "BombLauncher";

sleep 4.0;

Air1 fire "BombLauncher";

sleep 0.5;

Air1 fire "BombLauncher";

sleep 0.5;

Air1 fire "BombLauncher";

sleep 0.5;

Air1 fire "BombLauncher";

sleep 0.5;

_cam camSetFOV 0.7;

_cam camCommit 5;

Now this works fine. Only problem is that it looks a little silly having it drop four LGBs in a non-precision way.

So, I changed it to a normal harrier with Mk82 bombs, and changed the script to this:

_cam = "camera" CamCreate (getPos Air1);

_cam cameraeffect ["internal", "front"];

_cam attachTo [Air1, [-1.5, -12.00, -1.5]];

_cam camSetFOV 0.4;

_cam camsettarget BMP1;

_cam camCommit 0;

sleep 9.75;

Air1 selectWeapon "Mk82BombLauncher";

sleep 4.0;

Air1 fire "Mk82BombLauncher";

sleep 0.5;

Air1 fire "Mk82BombLauncher";

sleep 0.5;

Air1 fire "Mk82BombLauncher";

sleep 0.5;

Air1 fire "Mk82BombLauncher";

sleep 0.5;

_cam camSetFOV 0.7;

_cam camCommit 5;

Now he just wont drop the bombs.

fire "BombLauncher" works fine with LGBs, but with Mk82s "Mk82Launcher" does not work, even though that is the name of the weapon....

Any ideas what is going wrong here (or is ArmaII just totally bugged as it seems every second thing I want to do does not work)...

Share this post


Link to post
Share on other sites

Ok, thanks, I am trying to understand the command.

I cant find it in the Comref, why is that?

What would I do if I wanted to use this for a SMAW solider to fire on another unit?

Share this post


Link to post
Share on other sites

Because useweapon is not a command, it is an action. Read the BI wiki, it's good :)

Edited by ceeeb

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  

×